gtk: Do not try to activate a NULL GLContext
authorThibault Saunier <tsaunier@gnome.org>
Fri, 12 Jun 2015 13:39:56 +0000 (15:39 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Fri, 12 Jun 2015 13:40:29 +0000 (15:40 +0200)
At that point in the code nothing guarantees it exists

ext/gtk/gtkgstglwidget.c

index 100fa1d..dfe2c2f 100644 (file)
@@ -284,7 +284,8 @@ gtk_gst_gl_widget_render (GtkGLArea * widget, GdkGLContext * context)
     glClear (GL_COLOR_BUFFER_BIT);
   }
 
-  gst_gl_context_activate (gst_widget->priv->other_context, FALSE);
+  if (gst_widget->priv->other_context)
+    gst_gl_context_activate (gst_widget->priv->other_context, FALSE);
 
   g_mutex_unlock (&gst_widget->priv->lock);
   return FALSE;