diff options
Diffstat (limited to 'gdk-pixbuf/io-icns.c')
-rw-r--r-- | gdk-pixbuf/io-icns.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/gdk-pixbuf/io-icns.c b/gdk-pixbuf/io-icns.c index b832c761c..bee669b8b 100644 --- a/gdk-pixbuf/io-icns.c +++ b/gdk-pixbuf/io-icns.c @@ -399,6 +399,10 @@ gdk_pixbuf__icns_image_begin_load (GdkPixbufModuleSizeFunc size_func, { IcnsProgressiveState *context; + g_assert (size_func != NULL); + g_assert (prepared_func != NULL); + g_assert (updated_func != NULL); + context = g_new0 (IcnsProgressiveState, 1); context->size_func = size_func; context->prepared_func = prepared_func; @@ -461,23 +465,20 @@ gdk_pixbuf__icns_image_load_increment (gpointer data, w = gdk_pixbuf_get_width (context->pixbuf); h = gdk_pixbuf_get_height (context->pixbuf); - if (context->size_func != NULL) - (*context->size_func) (&w, - &h, - context->user_data); - - if (context->prepared_func != NULL) - (*context->prepared_func) (context->pixbuf, - NULL, - context->user_data); - - if (context->updated_func != NULL) - (*context->updated_func) (context->pixbuf, - 0, - 0, - gdk_pixbuf_get_width (context->pixbuf), - gdk_pixbuf_get_height (context->pixbuf), - context->user_data); + (*context->size_func) (&w, + &h, + context->user_data); + + (*context->prepared_func) (context->pixbuf, + NULL, + context->user_data); + + (*context->updated_func) (context->pixbuf, + 0, + 0, + gdk_pixbuf_get_width (context->pixbuf), + gdk_pixbuf_get_height (context->pixbuf), + context->user_data); return TRUE; } |