mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Fix segfault on screendump with -nographic
When running -nographic and calling "screendump" on the monitor, qemu segfaults. Fix the invalid pointer dereference by checking for NULL. Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
@@ -180,7 +180,7 @@ void vga_hw_screen_dump(const char *filename)
|
||||
active_console = consoles[0];
|
||||
/* There is currently no way of specifying which screen we want to dump,
|
||||
so always dump the first one. */
|
||||
if (consoles[0]->hw_screen_dump)
|
||||
if (consoles[0] && consoles[0]->hw_screen_dump)
|
||||
consoles[0]->hw_screen_dump(consoles[0]->hw, filename);
|
||||
active_console = previous_active_console;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user