projects
/
projects
/
chimara
/
chimara.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13cfe31
)
Check if image exists before caching it
author
P. F. Chimento
<philip.chimento@gmail.com>
Thu, 4 Aug 2011 18:23:49 +0000
(20:23 +0200)
committer
P. F. Chimento
<philip.chimento@gmail.com>
Thu, 4 Aug 2011 18:27:21 +0000
(20:27 +0200)
If a resource load callback returns an invalid file name, for example,
then the image operation should be aborted.
libchimara/graphics.c
patch
|
blob
|
history
diff --git
a/libchimara/graphics.c
b/libchimara/graphics.c
index afe3e76386a75899cda8850260cd68f566513cb8..0c3215a6f3c66f01b1c50bb63a259ff844a49d3f 100644
(file)
--- 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();