Check if image exists before caching it
[projects/chimara/chimara.git] / libchimara / graphics.c
index afe3e76386a75899cda8850260cd68f566513cb8..0c3215a6f3c66f01b1c50bb63a259ff844a49d3f 100644 (file)
@@ -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();