aboutsummaryrefslogtreecommitdiff
path: root/hw/sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sd.c')
-rw-r--r--hw/sd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/sd.c b/hw/sd.c
index 5e29752d90..f44a97092b 100644
--- a/hw/sd.c
+++ b/hw/sd.c
@@ -460,8 +460,8 @@ void sd_set_cb(SDState *sd, qemu_irq readonly, qemu_irq insert)
{
sd->readonly_cb = readonly;
sd->inserted_cb = insert;
- qemu_set_irq(readonly, bdrv_is_read_only(sd->bdrv));
- qemu_set_irq(insert, bdrv_is_inserted(sd->bdrv));
+ qemu_set_irq(readonly, sd->bdrv ? bdrv_is_read_only(sd->bdrv) : 0);
+ qemu_set_irq(insert, sd->bdrv ? bdrv_is_inserted(sd->bdrv) : 0);
}
static void sd_erase(SDState *sd)