gl: do not raise a critical msg if the backend does not handle window events
authorJulien Isorce <j.isorce@samsung.com>
Tue, 11 Nov 2014 23:43:42 +0000 (23:43 +0000)
committerJulien Isorce <j.isorce@samsung.com>
Wed, 12 Nov 2014 00:07:06 +0000 (00:07 +0000)
Fix "assertion 'window_class->handle_events != NULL' failed"
if not using a X11 window.

gst-libs/gst/gl/gstglwindow.c

index ba406f0..f15afc7 100644 (file)
@@ -991,7 +991,7 @@ gst_gl_window_handle_events (GstGLWindow * window, gboolean handle_events)
 
   g_return_if_fail (GST_GL_IS_WINDOW (window));
   window_class = GST_GL_WINDOW_GET_CLASS (window);
-  g_return_if_fail (window_class->handle_events != NULL);
 
-  window_class->handle_events (window, handle_events);
+  if (window_class->handle_events)
+    window_class->handle_events (window, handle_events);
 }