From caec37ef250648a489562fbe9dd1782bebcb836a Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 24 Apr 2016 19:13:07 +0000 Subject: [PATCH] fix newish crash on windows when shutting down with --num-cores 1 --- desmume/src/windows/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index e6011b3c1..0d15713ed 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -2016,7 +2016,8 @@ void KillDisplay() { display_die = true; SetEvent(display_wakeup_event); - sthread_join(display_thread); + if(display_thread) + sthread_join(display_thread); } void Display()