aboutsummaryrefslogtreecommitdiff
path: root/vnc.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-08-25 01:36:20 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-08-25 01:36:20 +0000
commite25a5822ca2dfd229471cc5d02458956b1bf0fa8 (patch)
tree20f7958af2bea0ca2ab2d8dbd23e3edfcfcfb8f8 /vnc.c
parent71cab5ca0d9f10cf9f07eaf3033687bf85459d52 (diff)
downloadqemu-e25a5822ca2dfd229471cc5d02458956b1bf0fa8.zip
qemu-e25a5822ca2dfd229471cc5d02458956b1bf0fa8.tar.gz
qemu-e25a5822ca2dfd229471cc5d02458956b1bf0fa8.tar.bz2
Extend monitor 'change' command for VNC, by Daniel P. Berrange.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3134 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vnc.c')
-rw-r--r--vnc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vnc.c b/vnc.c
index f47b5b9..a5ed107 100644
--- a/vnc.c
+++ b/vnc.c
@@ -1208,7 +1208,7 @@ void vnc_display_init(DisplayState *ds)
void vnc_display_close(DisplayState *ds)
{
- VncState *vs = (VncState *)ds->opaque;
+ VncState *vs = ds ? (VncState *)ds->opaque : vnc_state;
if (vs->display) {
qemu_free(vs->display);
@@ -1239,7 +1239,7 @@ int vnc_display_open(DisplayState *ds, const char *arg)
int reuse_addr, ret;
socklen_t addrlen;
const char *p;
- VncState *vs = (VncState *)ds->opaque;
+ VncState *vs = ds ? (VncState *)ds->opaque : vnc_state;
vnc_display_close(ds);
if (strcmp(arg, "none") == 0)