spice: monitors_config: check pointer before dereferencing

Reported-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2014-04-07 12:15:44 +02:00
parent 466e6e9d13
commit dc491cfc14

View file

@ -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.