From: Stefan Weil Date: Wed, 16 Feb 2011 19:48:00 +0000 (+0100) Subject: vnc: Fix fatal crash with vnc reverse mode X-Git-Tag: v0.14.1~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74b121a007c52b435870def4b1f1e6c42042bf51;p=thirdparty%2Fqemu.git vnc: Fix fatal crash with vnc reverse mode Reverse mode is unusable: qemu -vnc localhost:5500,reverse crashes in vnc_refresh_server_surface because some pointers are NULL. Fix this by calling vnc_dpy_resize (which initializes these pointers) before calling vnc_refresh. Cc: Anthony Liguori Signed-off-by: Stefan Weil Signed-off-by: Anthony Liguori --- diff --git a/ui/vnc.c b/ui/vnc.c index 560b98d441d..f4fea040587 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2349,6 +2349,7 @@ static void vnc_init_timer(VncDisplay *vd) vd->timer_interval = VNC_REFRESH_INTERVAL_BASE; if (vd->timer == NULL && !QTAILQ_EMPTY(&vd->clients)) { vd->timer = qemu_new_timer(rt_clock, vnc_refresh, vd); + vnc_dpy_resize(vd->ds); vnc_refresh(vd); } }