From 5229b501252d0e7bf82cb305a1be058fba353fd9 Mon Sep 17 00:00:00 2001 From: Vineeth TM Date: Thu, 2 Jul 2015 17:08:26 +0900 Subject: [PATCH] glimagesink: use g_clear_error instead of g_error_free replace g_error_free with g_clear_error, as it internally checks if error variable is valid or not. https://bugzilla.gnome.org/show_bug.cgi?id=751823 --- ext/gl/gstglimagesink.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c index 41e173f66f..c7dc5ff48a 100644 --- a/ext/gl/gstglimagesink.c +++ b/ext/gl/gstglimagesink.c @@ -788,10 +788,7 @@ context_error: gl_sink->context = NULL; } - if (error) { - g_error_free (error); - error = NULL; - } + g_clear_error (&error); return FALSE; }