Commit 35812bce authored by Vineeth T M's avatar Vineeth T M Committed by Sebastian Dröge

gl: Fix GError leaks during failures

https://bugzilla.gnome.org/show_bug.cgi?id=755140
parent 115691c5
...@@ -460,6 +460,7 @@ _get_gl_context (GtkGstGLWidget * gst_widget) ...@@ -460,6 +460,7 @@ _get_gl_context (GtkGstGLWidget * gst_widget)
GST_ERROR_OBJECT (gst_widget, "Error creating GdkGLContext : %s", GST_ERROR_OBJECT (gst_widget, "Error creating GdkGLContext : %s",
error ? error->message : "No error set by Gdk"); error ? error->message : "No error set by Gdk");
g_clear_error (&error);
g_assert_not_reached (); g_assert_not_reached ();
return; return;
} }
...@@ -501,6 +502,7 @@ _get_gl_context (GtkGstGLWidget * gst_widget) ...@@ -501,6 +502,7 @@ _get_gl_context (GtkGstGLWidget * gst_widget)
gst_gl_context_activate (priv->other_context, TRUE); gst_gl_context_activate (priv->other_context, TRUE);
if (!gst_gl_context_fill_info (priv->other_context, &error)) { if (!gst_gl_context_fill_info (priv->other_context, &error)) {
GST_ERROR ("failed to retrieve gdk context info: %s", error->message); GST_ERROR ("failed to retrieve gdk context info: %s", error->message);
g_clear_error (&error);
g_object_unref (priv->other_context); g_object_unref (priv->other_context);
priv->other_context = NULL; priv->other_context = NULL;
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment