From 976d4bae79db6d15ef533b6ed954d90f04c81ea8 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 6 Sep 2020 17:47:49 +1000 Subject: [PATCH] TimingEvent: Fix crash when invalid save state loaded --- src/core/timing_event.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/timing_event.cpp b/src/core/timing_event.cpp index 1580aa188..8197eff80 100644 --- a/src/core/timing_event.cpp +++ b/src/core/timing_event.cpp @@ -207,7 +207,8 @@ static void RemoveActiveEvent(TimingEvent* event) else { s_active_events_head = event->next; - UpdateCPUDowncount(); + if (s_active_events_head) + UpdateCPUDowncount(); } event->prev = nullptr;