qxl: check qxl_phys2virt return value
Fixes: CID 1395986
Fixes: 979f7ef896
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20181005134608.1251-1-kraxel@redhat.com
This commit is contained in:
parent
a0d098b794
commit
2f99f80c5d
@ -290,7 +290,7 @@ static void qxl_spice_monitors_config_async(PCIQXLDevice *qxl, int replay)
|
||||
}
|
||||
|
||||
cfg = qxl_phys2virt(qxl, qxl->guest_monitors_config, MEMSLOT_GROUP_GUEST);
|
||||
if (cfg->count == 1) {
|
||||
if (cfg != NULL && cfg->count == 1) {
|
||||
qxl->guest_primary.resized = 1;
|
||||
qxl->guest_head0_width = cfg->heads[0].width;
|
||||
qxl->guest_head0_height = cfg->heads[0].height;
|
||||
|
Loading…
Reference in New Issue
Block a user