]> git.proxmox.com Git - mirror_qemu.git/commit - console.c
console: Fix segfault on screendump without VGA adapter
authorAlexander Graf <agraf@suse.de>
Fri, 18 Nov 2011 15:41:59 +0000 (16:41 +0100)
committerAlexander Graf <agraf@suse.de>
Tue, 3 Jan 2012 01:49:25 +0000 (02:49 +0100)
commit33bcd98c4e9fe0866807bef6253a057c82087539
tree86d7a72616d61ef47e8e49de7d96750e88f3878c
parent4e9200a0a0f89ad2b26f6aa42e1fca16b364a8c8
console: Fix segfault on screendump without VGA adapter

When trying to create a screen dump without having any VGA adapter
inside the guest, QEMU segfaults.

This is because it's trying to switch back to the "previous" screen
it was on before dumping the VGA screen. Unfortunately, in my case
there simply is no previous screen so it accesses a NULL pointer.

Fix it by checking if previous_active_console is actually available.

This is 1.0 material.

Signed-off-by: Alexander Graf <agraf@suse.de>
console.c