From 06828f71a134e0b880601665c0daea78e6523633 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 14 Dec 2014 22:01:30 +0100 Subject: vo_x11: don't attempt to resize when unconfigured Fixes #1347. The previous commit actually fixes the crash. --- video/out/vo_x11.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index 37e9607f0a..419467279f 100644 --- a/video/out/vo_x11.c +++ b/video/out/vo_x11.c @@ -620,7 +620,8 @@ static int control(struct vo *vo, uint32_t request, void *data) case VOCTRL_GET_PANSCAN: return VO_TRUE; case VOCTRL_SET_PANSCAN: - resize(vo); + if (vo->config_ok) + resize(vo); return VO_TRUE; case VOCTRL_REDRAW_FRAME: draw_image(vo, p->original_image); @@ -634,7 +635,7 @@ static int control(struct vo *vo, uint32_t request, void *data) int events = 0; int r = vo_x11_control(vo, &events, request, data); - if (events & (VO_EVENT_EXPOSE | VO_EVENT_RESIZE)) + if (vo->config_ok && (events & (VO_EVENT_EXPOSE | VO_EVENT_RESIZE))) resize(vo); vo_event(vo, events); return r; -- cgit v1.2.3