waylandsink: Check instance of g_objcect_type 99/166099/1 accepted/tizen/4.0/unified/20180111.051031 submit/tizen_4.0/20180108.033855 tizen_4.0.IoT.p2_release
authorHyunil <hyunil46.park@samsung.com>
Mon, 8 Jan 2018 01:20:01 +0000 (10:20 +0900)
committerHyunil <hyunil46.park@samsung.com>
Mon, 8 Jan 2018 01:20:01 +0000 (10:20 +0900)
Change-Id: Ic9a20dfa24b389906e6f4de913d1afee8e728e10
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
ext/wayland/gstwaylandsink.c
ext/wayland/wldisplay.c

index ee4c6ef5162b174737c068e02dcda855f954a2f0..d9722c719f36a146a6a7759f862711890dc77ad7 100755 (executable)
@@ -720,7 +720,7 @@ gst_wayland_sink_make_flush_buffer (GstWlDisplay * display,
         if (dst.ptr)
           tbm_bo_unmap (bo);
         g_free (flush_buffer);
-       return FALSE;
+        return FALSE;
       }
       /* copy */
       memcpy (dst.ptr, src.ptr, bo_size);
@@ -1458,8 +1458,12 @@ gst_wayland_sink_find_display (GstWaylandSink * sink)
           ret = FALSE;
         }
 #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
-        if (G_LIKELY (sink->display))
+        if (G_LIKELY (sink->display)) {
           sink->display->USE_TBM = sink->USE_TBM;
+        } else {
+          GST_ERROR ("Failed to create GstWlDisplay");
+          ret = FALSE;
+        }
 #endif
       }
     }
index ad58c2cc592ac70b0dd0bda4e396ee306790ef9f..bfe1c0f7f90e4f37c0ccd56d931dd3eea7d21f4c 100644 (file)
@@ -371,6 +371,12 @@ gst_wl_display_new_existing (struct wl_display * display,
   g_return_val_if_fail (display != NULL, NULL);
 
   self = g_object_new (GST_TYPE_WL_DISPLAY, NULL);
+#ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
+  if (self == NULL) {
+    GST_ERROR ("g_object_new return value is null");
+    return NULL;
+  }
+#endif
   self->display = display;
   self->own_display = take_ownership;