msdkcontext: g_object_new() must not return nullptr
authorTong Wu <tong1.wu@intel.com>
Mon, 31 Oct 2022 08:56:32 +0000 (16:56 +0800)
committertong1wu <tong1.wu@intel.com>
Wed, 2 Nov 2022 07:40:59 +0000 (07:40 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>

subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.c

index 06836b7..93736d7 100644 (file)
@@ -419,8 +419,6 @@ gst_msdk_context_new_with_va_display (GstObject * display_obj,
     return NULL;
 
   obj = g_object_new (GST_TYPE_MSDK_CONTEXT, NULL);
-  if (!obj)
-    return NULL;
 
   priv = obj->priv;
   priv->display = g_object_ref (va_display);