summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
Diffstat (limited to 'video/out')
-rw-r--r--video/out/vo_xv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c
index 11c6efc26e..654f657ca3 100644
--- a/video/out/vo_xv.c
+++ b/video/out/vo_xv.c
@@ -382,6 +382,8 @@ static void xv_draw_colorkey(struct vo *vo, const struct mp_rect *rc)
if (ctx->xv_ck_info.method == CK_METHOD_MANUALFILL ||
ctx->xv_ck_info.method == CK_METHOD_BACKGROUND)
{
+ if (!x11->vo_gc)
+ return;
//less tearing than XClearWindow()
XSetForeground(x11->display, x11->vo_gc, ctx->xv_colorkey);
XFillRectangle(x11->display, x11->window, x11->vo_gc, rc->x0, rc->y0,