From 9fd7e34feeb694bb94c5969056e094639fb73c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 19 May 2014 12:21:13 +0200 Subject: [PATCH] glcontext: Add more assertions to make sure that everything sets the GError during context creation if something fails --- gst-libs/gst/gl/gstglcontext.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index cae532c1db..ea576017df 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -741,8 +741,10 @@ gst_gl_context_create_thread (GstGLContext * context) window_class = GST_GL_WINDOW_GET_CLASS (context->window); if (window_class->open) { - if (!window_class->open (context->window, error)) + if (!window_class->open (context->window, error)) { + g_assert (error == NULL || *error != NULL); goto failure; + } } gl = context->gl_vtable; @@ -834,8 +836,10 @@ gst_gl_context_create_thread (GstGLContext * context) _create_context_gles2 (context, &context->priv->gl_major, &context->priv->gl_minor, error); - if (!ret) + if (!ret) { + g_assert (error == NULL || *error != NULL); goto failure; + } /* GL core contexts and GLES3 */ if (gl->GetIntegerv && gl->GetStringi && context->priv->gl_major >= 3)