diff options
author | Matthias Clasen <mclasen@redhat.com> | 2006-02-10 19:02:38 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-02-10 19:02:38 +0000 |
commit | 9cd8b1b3ea5dbb49bbcefdaa64f7a243459344cf (patch) | |
tree | 3bfc63c0f1e000f77e0149395d86c8b9901152f4 /gdk-pixbuf/io-xbm.c | |
parent | fbab679564ae21870893af226f8572487817b5b9 (diff) | |
download | gdk-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.c | 5 |
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; } |