summaryrefslogtreecommitdiffstatsci
path: root/src/cairo-egl.cpp
diff options
context:
space:
mode:
authorBryce Harrington <b.harrington@samsung.com>2014-03-27 16:25:29 -0700
committerBryce Harrington <b.harrington@samsung.com>2014-03-27 16:38:21 -0700
commitdce2ef51f242460df7e8526cb0625f8f16983a24 (patch)
tree2022c9931bf59c789e23376e5853fd50e1b9c5b8 /src/cairo-egl.cpp
parente2b4bae92c27e13d7f8ddba92950445a85a363cb (diff)
egl: Check for error condition before creating a context
Diffstat (limited to 'src/cairo-egl.cpp')
-rw-r--r--src/cairo-egl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cairo-egl.cpp b/src/cairo-egl.cpp
index 253bc7c..c422225 100644
--- a/src/cairo-egl.cpp
+++ b/src/cairo-egl.cpp
@@ -35,6 +35,10 @@ create_cairo_surface_egl (int width, int height)
eglMakeCurrent(state->egl_display, state->egl_surface, state->egl_surface, state->egl_context);
cairo_device = cairo_egl_device_create (state->egl_display, state->egl_context);
+ cairo_status_t status = cairo_device_status (cairo_device);
+ if (status != CAIRO_STATUS_SUCCESS)
+ errx (-1, "Could not create EGL device: (%d) %s\n", status, cairo_status_to_string (status) );
+
cairo_gl_device_set_thread_aware (cairo_device, 0);
cairo_surface = cairo_gl_surface_create_for_egl (cairo_device,
state->egl_surface,