summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-04-03 14:49:50 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-04-03 14:50:15 -0400
commit610a3f29227d43e12a8acedce2b3149d16a60847 (patch)
treedd959d0324ef15fbce77cc1e10ab8fcd6acfe765
parent3685c3abf6c6f7d03b571458df52731ccf928981 (diff)
window: Check load_image result for NULL
-rw-r--r--clients/window.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clients/window.c b/clients/window.c
index 9f5b837..5391d64 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -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) {