Waylandsink : initialize display, window, pool and display_name to NULL in waylandsin... 98/45198/1 accepted/tizen/mobile/20150804.000105 accepted/tizen/tv/20150804.000117 accepted/tizen/wearable/20150804.000134 submit/tizen/20150803.122238
authorHyunil Park <hyunil46.park@samsung.com>
Mon, 3 Aug 2015 11:47:23 +0000 (20:47 +0900)
committerHyunil Park <hyunil46.park@samsung.com>
Mon, 3 Aug 2015 11:47:23 +0000 (20:47 +0900)
Change-Id: I3021cf4b76d0381558eb08a3a44fb624b49dc553
Signed-off-by: Hyunil Park <hyunil46.park@samsung.com>
ext/wayland/gstwaylandsink.c

index 0055c76..c8d4a61 100755 (executable)
@@ -235,14 +235,21 @@ gst_wayland_sink_finalize (GObject * object)
           (sink->pool));
 
     g_object_unref (sink->display);
+    sink->display = NULL;
   }
-  if (sink->window)
+  if (sink->window) {
     g_object_unref (sink->window);
-  if (sink->pool)
+    sink->window = NULL;
+  }
+  if (sink->pool) {
     gst_object_unref (sink->pool);
+    sink->pool = NULL;
+  }
 
-  if (sink->display_name)
+  if (sink->display_name) {
     g_free (sink->display_name);
+    sink->display_name = NULL;
+  }
 
   g_mutex_clear (&sink->display_lock);
   g_mutex_clear (&sink->render_lock);