glcontext: propagate the version/extension failure upwards
authorMatthew Waters <matthew@centricular.com>
Wed, 13 May 2015 13:55:28 +0000 (23:55 +1000)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:01 +0000 (19:32 +0000)
Otherwise the calling code has no idea that the context failed to
be created fully.

https://bugzilla.gnome.org/show_bug.cgi?id=749284

gst-libs/gst/gl/gstglcontext.c

index 18e527e..8a71df1 100644 (file)
@@ -1313,7 +1313,10 @@ gst_gl_context_create_thread (GstGLContext * context)
   g_free (display_api_s);
 
   GST_DEBUG_OBJECT (context, "Filling info");
-  gst_gl_context_fill_info (context, error);
+  if (!gst_gl_context_fill_info (context, error)) {
+    g_assert (error == NULL || *error != NULL);
+    goto failure;
+  }
 
   context->priv->alive = TRUE;