summaryrefslogtreecommitdiff
path: root/src/cairo-egl-context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-egl-context.c')
-rw-r--r--src/cairo-egl-context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-egl-context.c b/src/cairo-egl-context.c
index 00bfcbf9..eb1ef296 100644
--- a/src/cairo-egl-context.c
+++ b/src/cairo-egl-context.c
@@ -112,7 +112,8 @@ _egl_destroy (void *abstract_ctx)
eglMakeCurrent (ctx->display,
EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
- eglDestroySurface (ctx->display, ctx->dummy_surface);
+ if (ctx->dummy_surface != EGL_NO_SURFACE)
+ eglDestroySurface (ctx->display, ctx->dummy_surface);
}
static cairo_bool_t