diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-10-05 15:46:08 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-10-15 09:57:33 +0200 |
commit | 2f99f80c5dbb319bebede5f737efcb0b2253a45b (patch) | |
tree | 1657803942d2bf327f34a910f83ce9678e6f7060 | |
parent | a0d098b7942bf8522375c2f899d89c39b7f3c899 (diff) |
qxl: check qxl_phys2virt return value
Fixes: CID 1395986
Fixes: 979f7ef8966bc4495a710ed9e4af42098f92ee79
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20181005134608.1251-1-kraxel@redhat.com
-rw-r--r-- | hw/display/qxl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c index e628cf1286..f608abc769 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -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; |