projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ab91ad
)
cairo-util: load_cairo_surface returns NULL if loading the file fails.
author
Ustun Ergenoglu
<ego@ustun.fi>
Wed, 14 Mar 2012 20:07:58 +0000
(22:07 +0200)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Wed, 21 Mar 2012 02:43:55 +0000
(22:43 -0400)
Otherwise a non-existent file in the configuration crashes the desktop shell.
Signed-off-by: Ustun Ergenoglu <ego@ustun.fi>
clients/cairo-util.c
patch
|
blob
|
history
diff --git
a/clients/cairo-util.c
b/clients/cairo-util.c
index
1f8d307
..
6d5794b
100644
(file)
--- a/
clients/cairo-util.c
+++ b/
clients/cairo-util.c
@@
-300,6
+300,10
@@
load_cairo_surface(const char *filename)
void *data;
image = load_image(filename);
+ if (image == NULL) {
+ return NULL;
+ }
+
data = pixman_image_get_data(image);
width = pixman_image_get_width(image);
height = pixman_image_get_height(image);