aboutsummaryrefslogtreecommitdiff
path: root/hw/i8254.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/i8254.c')
-rw-r--r--hw/i8254.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/i8254.c b/hw/i8254.c
index a4a1efe9cc..44e453139b 100644
--- a/hw/i8254.c
+++ b/hw/i8254.c
@@ -467,7 +467,8 @@ static void pit_reset(void *opaque)
void hpet_pit_disable(void) {
PITChannelState *s;
s = &pit_state.channels[0];
- qemu_del_timer(s->irq_timer);
+ if (s->irq_timer)
+ qemu_del_timer(s->irq_timer);
}
/* When HPET is reset or leaving legacy mode, it must reenable i8254