[glide] API guards for GlideImage
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glide] API guards for GlideImage
- Date: Fri, 7 May 2010 19:35:46 +0000 (UTC)
commit 7f16da60343c33eba3de1a4da441f0820851b948
Author: Robert Carr <racarr Valentine localdomain>
Date: Fri May 7 13:33:44 2010 -0400
API guards for GlideImage
libglide/glide-image.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libglide/glide-image.c b/libglide/glide-image.c
index 75b5ff8..2378167 100644
--- a/libglide/glide-image.c
+++ b/libglide/glide-image.c
@@ -398,6 +398,8 @@ glide_image_set_from_file (GlideImage *image,
CoglTextureFlags flags = COGL_TEXTURE_NONE;
gchar *resource, *resource_file;
+ g_return_val_if_fail (GLIDE_IS_IMAGE (image), FALSE);
+
priv = image->priv;
resource = glide_actor_add_resource (GLIDE_ACTOR (image), filename);
@@ -477,5 +479,6 @@ glide_image_new_from_file (const gchar *filename,
const gchar *
glide_image_get_filename (GlideImage *image)
{
+ g_return_val_if_fail (GLIDE_IS_IMAGE (image), NULL);
return image->priv->filename;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]