diff mbox

ui/spice-core: fix segfault in monitor

Message ID 1317727553-19852-1-git-send-email-alevy@redhat.com
State New
Headers show

Commit Message

Alon Levy Oct. 4, 2011, 11:25 a.m. UTC
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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Gerd Hoffmann Oct. 14, 2011, 1:22 p.m. UTC | #1
On 10/04/11 13:25, Alon Levy wrote:
> Fix segfault if a qxl device is present but no spice command line
> argument is given.
>
> RHBZ 743251.

Added to spice patch queue.

thanks,
   Gerd
diff mbox

Patch

diff --git a/ui/spice-core.c b/ui/spice-core.c
index 3cbc721..b14d1d9 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -413,7 +413,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;
     }