]> git.ipfire.org Git - thirdparty/qemu.git/commit
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>
Thu, 12 Jan 2012 17:30:50 +0000 (18:30 +0100)
commit986626efecae87af17a9d9726767501cb4687b8c
tree4c83b997ad2c32fcaba5d49e4a86d7f645287a81
parent85a4ca797dbe25f27df0a66aa4df1cab63245cd3
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