[702/906] x11: fix segfault if the x11 backend is instantiated but not used
authorMatthew Waters <ystreet00@gmail.com>
Wed, 12 Jun 2013 13:21:16 +0000 (23:21 +1000)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:28 +0000 (19:31 +0000)
gst-libs/gst/gl/x11/gstglwindow_x11.c

index c52a334..6fa7598 100644 (file)
@@ -213,6 +213,8 @@ static void
 gst_gl_window_x11_init (GstGLWindowX11 * window)
 {
   window->priv = GST_GL_WINDOW_X11_GET_PRIVATE (window);
+
+  g_cond_init (&window->cond_send_message);
 }
 
 /* Must be called in the gl thread */
@@ -255,7 +257,6 @@ gst_gl_window_x11_create_context (GstGLWindow * window,
 
   gst_gl_window_set_need_lock (GST_GL_WINDOW (window_x11), TRUE);
 
-  g_cond_init (&window_x11->cond_send_message);
   window_x11->running = TRUE;
   window_x11->visible = FALSE;
   window_x11->parent_win = 0;