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)
committerMatthew Waters <matthew@centricular.com>
Thu, 22 Jan 2015 10:43:51 +0000 (21:43 +1100)
gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m

index 109504dd00bbdb8edfe342de092d108c9205cba6..341f02b5c9781cb5b6bcd1e7824b02927fff9063 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;
   }