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-pnm.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-pnm.c')
-rw-r--r-- | gdk-pixbuf/io-pnm.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdk-pixbuf/io-pnm.c b/gdk-pixbuf/io-pnm.c index 81e50a7f7..81225740a 100644 --- a/gdk-pixbuf/io-pnm.c +++ b/gdk-pixbuf/io-pnm.c @@ -1015,9 +1015,10 @@ gdk_pixbuf__pnm_image_load_increment (gpointer data, context->rowstride = context->pixbuf->rowstride; /* Notify the client that we are ready to go */ - (* context->prepared_func) (context->pixbuf, - NULL, - context->user_data); + if (context->prepared_func) + (* context->prepared_func) (context->pixbuf, + NULL, + context->user_data); } /* if we got here we're reading image data */ @@ -1028,7 +1029,7 @@ gdk_pixbuf__pnm_image_load_increment (gpointer data, break; } else if (retval == PNM_FATAL_ERR) { return FALSE; - } else if (retval == PNM_OK) { + } else if (retval == PNM_OK && context->updated_func) { /* send updated signal */ (* context->updated_func) (context->pixbuf, 0, |