diff --git a/gst/gstelement.c b/gst/gstelement.c index 587de1b591..7ee52e3c22 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -3082,5 +3082,5 @@ gst_element_get_context (GstElement * element) context = gst_context_ref (element->context); GST_OBJECT_UNLOCK (element); - return context; + return context ? context : gst_context_new (); }