summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-pnm.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-pnm.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-pnm.c')
-rw-r--r--gdk-pixbuf/io-pnm.c9
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,