tizenwlsink : Check instance of object_type 94/166094/2 submit/tizen/20180108.034048
authorHyunil <hyunil46.park@samsung.com>
Mon, 8 Jan 2018 00:48:39 +0000 (09:48 +0900)
committerHyunil <hyunil46.park@samsung.com>
Mon, 8 Jan 2018 01:05:09 +0000 (10:05 +0900)
Change-Id: I4ab2944d8a9432a370279e2bd9fef9ce974fa17e
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
tizenwlsink/src/gsttizenwlsink.c
tizenwlsink/src/wldisplay.c

index 51fad82..594d63a 100644 (file)
@@ -725,7 +725,7 @@ gst_tizen_wl_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);
@@ -1469,8 +1469,12 @@ gst_tizen_wl_sink_find_display (GstTizenWlSink * 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 cb5b7b3..b1c8e27 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;