window: Check load_image result for NULL
This commit is contained in:
parent
3685c3abf6
commit
610a3f2922
@ -416,6 +416,8 @@ display_create_egl_image_surface_from_file(struct display *display,
|
||||
struct egl_image_surface_data *data;
|
||||
|
||||
image = load_image(filename);
|
||||
if (image == NULL)
|
||||
return NULL;
|
||||
|
||||
surface = display_create_egl_image_surface(display, 0, rect);
|
||||
if (surface == NULL) {
|
||||
@ -562,6 +564,8 @@ display_create_shm_surface_from_file(struct display *display,
|
||||
int size;
|
||||
|
||||
image = load_image(filename);
|
||||
if (image == NULL)
|
||||
return NULL;
|
||||
|
||||
surface = display_create_shm_surface(display, rect, 0, NULL);
|
||||
if (surface == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user