summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-xbm.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-02-10 19:02:38 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-02-10 19:02:38 +0000
commit9cd8b1b3ea5dbb49bbcefdaa64f7a243459344cf (patch)
tree3bfc63c0f1e000f77e0149395d86c8b9901152f4 /gdk-pixbuf/io-xbm.c
parentfbab679564ae21870893af226f8572487817b5b9 (diff)
downloadgdk-pixbuf-9cd8b1b3ea5dbb49bbcefdaa64f7a243459344cf.tar.gz
Always check for NULL when using callbacks. (#330563, Benjamin Otte)
2006-02-10 Matthias Clasen <mclasen@redhat.com> * io-jpeg.c: * io-png.c: * io-pnm.c: * io-tiff.c: * io-xbm.c: * io-xpm.c: Always check for NULL when using callbacks. (#330563, Benjamin Otte)
Diffstat (limited to 'gdk-pixbuf/io-xbm.c')
-rw-r--r--gdk-pixbuf/io-xbm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdk-pixbuf/io-xbm.c b/gdk-pixbuf/io-xbm.c
index 9d808703e..90d8120a1 100644
--- a/gdk-pixbuf/io-xbm.c
+++ b/gdk-pixbuf/io-xbm.c
@@ -309,7 +309,7 @@ gdk_pixbuf__xbm_image_load_real (FILE *f, XBMData *context, GError **error)
pixels = gdk_pixbuf_get_pixels (pixbuf);
row_stride = gdk_pixbuf_get_rowstride (pixbuf);
- if (context)
+ if (context && context->prepare_func)
(* context->prepare_func) (pixbuf, NULL, context->user_data);
@@ -338,7 +338,8 @@ gdk_pixbuf__xbm_image_load_real (FILE *f, XBMData *context, GError **error)
g_free (data);
if (context) {
- (* context->update_func) (pixbuf, 0, 0, w, h, context->user_data);
+ if (context->update_func)
+ (* context->update_func) (pixbuf, 0, 0, w, h, context->user_data);
g_object_unref (pixbuf);
pixbuf = NULL;
}