summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-07 13:47:36 +0200
committerwm4 <wm4@nowhere>2015-10-07 13:49:29 +0200
commitaa796c23db097c835aeaa711ab3b2ba1eb8721a8 (patch)
treef16a14373eca56d1688661c0085a3994deb1a29e /video
parent0a41c6f0ec1adeb4e627daeddb474c0c9bdad008 (diff)
downloadmpv-aa796c23db097c835aeaa711ab3b2ba1eb8721a8.tar.bz2
mpv-aa796c23db097c835aeaa711ab3b2ba1eb8721a8.tar.xz
vo_xv: fix crash with --wid
Fixes #2386. Reminder that you should not use this crap-VO.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_xv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c
index 293d9f7929..e799e8fc45 100644
--- a/video/out/vo_xv.c
+++ b/video/out/vo_xv.c
@@ -411,7 +411,7 @@ static void fill_rect(struct vo *vo, GC gc, int x0, int y0, int x1, int y1)
x1 = MPMIN(x1, vo->dwidth);
y1 = MPMIN(y1, vo->dheight);
- if (x11->window && x1 > x0 && y1 > y0)
+ if (x11->window && gc && x1 > x0 && y1 > y0)
XFillRectangle(x11->display, x11->window, gc, x0, y0, x1 - x0, y1 - y0);
}