aboutsummaryrefslogtreecommitdiff
path: root/ui/vnc.c
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2011-02-16 20:48:00 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-02-23 16:28:29 -0600
commit5db8378a7710df7899544004967597eb395418c2 (patch)
tree9fbc34aa85ff022e691f71b9ebfeacb8bb5f8aa6 /ui/vnc.c
parent80e0c8c39b663cd44ea8d47efe256897b7102f50 (diff)
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 <aliguori@us.ibm.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/vnc.c')
-rw-r--r--ui/vnc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 626b430095..610f88485e 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2480,6 +2480,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);
}
}