glcontext/cocoa: avoid destroying a possibly 0 GSource id
authorMatthew Waters <matthew@centricular.com>
Thu, 22 Jan 2015 10:43:51 +0000 (21:43 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:53 +0000 (19:31 +0000)
gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m

index 109504d..341f02b 100644 (file)
@@ -363,8 +363,10 @@ gst_gl_context_cocoa_create_context (GstGLContext *context, GstGLAPI gl_api,
   });
 
   if (!context_cocoa->priv->gl_context) {
+#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION
     g_source_remove (priv->source_id);
     priv->source_id = 0;
+#endif
     return FALSE;
   }