summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2010-12-07 23:00:45 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-02-28 08:29:08 +0100
commitf55606c2a76d4f26187b2e864c4838b6f8f5eb16 (patch)
treef6e7d3974de37136c0ff015a0ad874d1a3e9fb8a
parent50e507f0d5ab968671d072ae43f9f9671b674b3f (diff)
wayland: check whether eglCreateDRMImageMESA was successfull
-rw-r--r--src/video/wayland/SDL_waylandwindow.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 706a0621..c368d35d 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -61,6 +61,12 @@ int Wayland_CreateWindow(_THIS, SDL_Window * window)
attribs[3] = window->h;
data->image[i] =
eglCreateDRMImageMESA(c->edpy, attribs);
+ if (data->image[i] == NULL) {
+ SDL_SetError("Failed to create DRM-Image with attribs: width: %d, height: %d\n",
+ window->w, window->h);
+ free(data);
+ return -1;
+ }
eglExportDRMImageMESA(c->edpy, data->image[i],
&name, NULL, &stride);
data->buffer[i] =