]> xenbits.xensource.com Git - qemu-upstream-4.5-testing.git/commitdiff
ui/spice-core: fix segfault in monitor
authorAlon Levy <alevy@redhat.com>
Tue, 4 Oct 2011 11:25:53 +0000 (13:25 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 25 Oct 2011 12:00:54 +0000 (14:00 +0200)
Fix segfault if a qxl device is present but no spice command line
argument is given.

RHBZ 743251.

Signed-off-by: Alon Levy <alevy@redhat.com>
ui/spice-core.c

index 4c06c36c313d8ddbe26899042e5cf3dcc4875a09..be52356e63ab20ea4af436f783316b2dcab0824e 100644 (file)
@@ -445,7 +445,7 @@ void do_info_spice(Monitor *mon, QObject **ret_data)
     int port, tls_port;
     char version_string[20]; /* 12 = |255.255.255\0| is the max */
 
-    if (!spice_server) {
+    if (!spice_server || !opts) {
         *ret_data = qobject_from_jsonf("{ 'enabled': false }");
         return;
     }