diff options
author | Alexander Graf <agraf@suse.de> | 2011-05-26 23:50:33 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-06-03 12:42:19 +0200 |
commit | e34b12ae98b6851da8acc791d6df05f4482ae416 (patch) | |
tree | 4d4a83d902ed20e309ce5b11f4e68e9b85d7466c | |
parent | fbd659b76c0601efc49a4a3291730ca47f36c12c (diff) |
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>
-rw-r--r-- | console.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |