diff options
-rw-r--r-- | hw/ide/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index 00e21cf7ef..d4af5e2eb1 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -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; |