From: Gerd Hoffmann Date: Mon, 7 Apr 2014 10:15:44 +0000 (+0200) Subject: spice: monitors_config: check pointer before dereferencing X-Git-Tag: qemu-xen-4.5.0-rc1~47^2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=dc491cfc14074064ed54a872b62cce6ca1330644;p=qemu-upstream-4.5-testing.git spice: monitors_config: check pointer before dereferencing Reported-by: Fabio Fantoni Signed-off-by: Gerd Hoffmann --- diff --git a/ui/spice-display.c b/ui/spice-display.c index e28698c6b..ce6b220f5 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -549,6 +549,10 @@ static int interface_client_monitors_config(QXLInstance *sin, QemuUIInfo info; int rc; + if (!mc) { + return 1; + } + /* * FIXME: multihead is tricky due to the way * spice has multihead implemented.