Skip to contentSkip to conversation

[6010] vnc: Fix crash on 'info vnc' after 'change vnc none'

Qemu-devel Aurelien Jarno 1 participant 1 message Dec 13, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 6010

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6010
Author:   aurel32
Date:     2008-12-13 18:57:12 +0000 (Sat, 13 Dec 2008)

Log Message:
-----------
vnc: Fix crash on 'info vnc' after 'change vnc none'

vnc_state->display is set to NULL after "change vnc none" but vnc_state itself is still valid.

(James Ko)

Modified Paths:
--------------
trunk/vnc.c

Modified: trunk/vnc.c
===================================================================

vnc.c +1 -1
@@ -183,7 +183,7 @@
 
 void do_info_vnc(void)
 {
-    if (vnc_state == NULL)
+    if (vnc_state == NULL || vnc_state->display == NULL)
 	term_printf("VNC server disabled\n");
     else {
 	term_printf("VNC server active on: ");