X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fgraphics.c;h=0c3215a6f3c66f01b1c50bb63a259ff844a49d3f;hb=7cbc2c68d146433b1d438d60406ca05e14a523ce;hp=6842000e38c6f7acf3746d8e24692c53b09322a2;hpb=393b7a2b777d06754da16ffa5998d3eb9bf128ad;p=projects%2Fchimara%2Fchimara.git diff --git a/libchimara/graphics.c b/libchimara/graphics.c index 6842000..0c3215a 100644 --- a/libchimara/graphics.c +++ b/libchimara/graphics.c @@ -123,6 +123,9 @@ load_image_in_cache(glui32 image, gint width, gint height) info = load_image_from_blorb(resource, image, width, height); } + if(info == NULL) + return NULL; + /* Store the image in the cache */ gdk_threads_enter(); @@ -229,11 +232,11 @@ image_cache_find(struct image_info* to_find) * @height: Pointer to a location at which to store the image's height. * * This gets information about the image resource with the given identifier. It - * returns %TRUE if there is such an image, and %FALSE if not. You can also pass - * pointers to width and height variables; if the image exists, the variables - * will be filled in with the width and height of the image, in pixels. (You can - * pass %NULL for either width or height if you don't care about that - * information.) + * returns %TRUE (1) if there is such an image, and %FALSE (0) if not. You can + * also pass pointers to width and height variables; if the image exists, the + * variables will be filled in with the width and height of the image, in + * pixels. (You can pass %NULL for either width or height if you don't care + * about that information.) * * * You should always use this function to measure the size of images when you