mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
gl: Fix GError leaks during failures
https://bugzilla.gnome.org/show_bug.cgi?id=755140
This commit is contained in:
parent
115691c508
commit
35812bce51
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||||
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 {
|
||||||
|
|
Loading…
Reference in a new issue