diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-04-03 14:49:50 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-04-03 14:50:15 -0400 |
commit | 610a3f29227d43e12a8acedce2b3149d16a60847 (patch) | |
tree | dd959d0324ef15fbce77cc1e10ab8fcd6acfe765 | |
parent | 3685c3abf6c6f7d03b571458df52731ccf928981 (diff) |
window: Check load_image result for NULL
-rw-r--r-- | clients/window.c | 4 |
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) { |