summaryrefslogtreecommitdiff
path: root/sys/ximage/ximagesink.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ximage/ximagesink.c')
-rw-r--r--sys/ximage/ximagesink.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index c6931acd8..e7f489298 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -922,10 +922,13 @@ gst_ximagesink_xwindow_update_geometry (GstXImageSink * ximagesink)
XWindowAttributes attr;
g_return_if_fail (GST_IS_XIMAGESINK (ximagesink));
- g_return_if_fail (ximagesink->xwindow != NULL);
/* Update the window geometry */
g_mutex_lock (ximagesink->x_lock);
+ if (G_UNLIKELY (ximagesink->xwindow == NULL)) {
+ g_mutex_unlock (ximagesink->x_lock);
+ return;
+ }
XGetWindowAttributes (ximagesink->xcontext->disp,
ximagesink->xwindow->win, &attr);