From 3a9fde7b24ee8f4d88a31ae33d85fd933df58786 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 26 Mar 2020 13:50:52 +1100 Subject: [PATCH] glcontext: add context is valid precondition to get_thread() --- gst-libs/gst/gl/gstglcontext.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index b76f246..4465249 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -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) -- 2.7.4