cairo-util: load_cairo_surface returns NULL if loading the file fails.
Otherwise a non-existent file in the configuration crashes the desktop shell. Signed-off-by: Ustun Ergenoglu <ego@ustun.fi>
This commit is contained in:
parent
5ab91ad845
commit
6dc0f86dbd
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user