Waylandsink : fix svace bug 40/74440/1 accepted/tizen/common/20160620.162513 accepted/tizen/ivi/20160617.082453 accepted/tizen/mobile/20160617.081946 accepted/tizen/tv/20160617.082040 accepted/tizen/wearable/20160617.082140 submit/tizen/20160616.065630
authorHyunil <hyunil46.park@samsung.com>
Tue, 14 Jun 2016 08:03:22 +0000 (17:03 +0900)
committerHyunil <hyunil46.park@samsung.com>
Tue, 14 Jun 2016 08:03:22 +0000 (17:03 +0900)
Change-Id: I020c6aae3a55872d73b34e39253603dd2f42d37d
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
ext/wayland/gstwaylandsink.c
ext/wayland/wlwindow.c

index d6c16fb..a07eb8e 100755 (executable)
@@ -398,7 +398,8 @@ gst_wayland_sink_update_last_buffer_geometry (GstWaylandSink * sink)
   GST_DEBUG ("gstbuffer ref count is %d",
       GST_OBJECT_REFCOUNT_VALUE (sink->last_buffer));
   wlbuffer = gst_buffer_get_wl_buffer (sink->last_buffer);
-  wlbuffer->used_by_compositor = FALSE;
+  if (wlbuffer)
+    wlbuffer->used_by_compositor = FALSE;
   /*need to render last buffer, reuse current GstWlBuffer */
   render_last_buffer (sink);
   /* ref count is incresed in gst_wl_buffer_attach() of render_last_buffer(),
index 90fd3fa..f12b1ca 100644 (file)
@@ -139,9 +139,10 @@ gst_wl_window_map_sub_surface (GstWlDisplay * display, GstWlWindow * window,
   GstWlBuffer *gwlbuf;
   GstWlShmAllocator *self = NULL;
   FUNCTION;
-  g_return_val_if_fail (display, NULL);
-  g_return_val_if_fail (window, NULL);
-  g_return_val_if_fail (info, NULL);
+
+  g_return_if_fail (display != NULL);
+  g_return_if_fail (window != NULL);
+  g_return_if_fail (info != NULL);
 
   self = GST_WL_SHM_ALLOCATOR (gst_wl_shm_allocator_get ());
   self->display = display;