From aa796c23db097c835aeaa711ab3b2ba1eb8721a8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 7 Oct 2015 13:47:36 +0200 Subject: vo_xv: fix crash with --wid Fixes #2386. Reminder that you should not use this crap-VO. --- video/out/vo_xv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit v1.2.3