Commit 6b896ab2 authored by Don Slutz's avatar Don Slutz Committed by Peter Maydell

hw/ide/core.c: Prevent SIGSEGV during migration

The other callers to blk_set_enable_write_cache() in this file
already check for s->blk == NULL.
Signed-off-by: default avatarDon Slutz <>
Reviewed-by: default avatarPaolo Bonzini <>
Reviewed-by: default avatarStefan Hajnoczi <>
Signed-off-by: default avatarPeter Maydell <>
parent 8336e465
......@@ -2401,7 +2401,7 @@ static int ide_drive_post_load(void *opaque, int version_id)
IDEState *s = opaque;
if (s->identify_set) {
if (s->blk && s->identify_set) {
blk_set_enable_write_cache(s->blk, !!(s->identify_data[85] & (1 << 5)));
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment