diff options
-rw-r--r-- | vl.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -915,7 +915,7 @@ struct qemu_alarm_timer { static inline int alarm_has_dynticks(struct qemu_alarm_timer *t) { - return t->flags & ALARM_FLAG_DYNTICKS; + return t && (t->flags & ALARM_FLAG_DYNTICKS); } static void qemu_rearm_alarm_timer(struct qemu_alarm_timer *t) @@ -1349,7 +1349,7 @@ static void host_alarm_handler(int host_signum) qemu_timer_expired(active_timers[QEMU_TIMER_REALTIME], qemu_get_clock(rt_clock))) { qemu_event_increment(); - alarm_timer->flags |= ALARM_FLAG_EXPIRED; + if (alarm_timer) alarm_timer->flags |= ALARM_FLAG_EXPIRED; #ifndef CONFIG_IOTHREAD if (next_cpu) { |