glcontext: add context is valid precondition to get_thread()
authorMatthew Waters <matthew@centricular.com>
Thu, 26 Mar 2020 02:50:52 +0000 (13:50 +1100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 26 Mar 2020 11:25:44 +0000 (11:25 +0000)
gst-libs/gst/gl/gstglcontext.c

index b76f246..4465249 100644 (file)
@@ -801,6 +801,8 @@ gst_gl_context_get_thread (GstGLContext * context)
 {
   GThread *ret;
 
+  g_return_val_if_fail (GST_IS_GL_CONTEXT (context), NULL);
+
   GST_OBJECT_LOCK (context);
   ret = context->priv->active_thread;
   if (ret)