From e48f4ce004c5c871282e62a71e23a803e9d8fa09 Mon Sep 17 00:00:00 2001 From: gibbed Date: Sat, 3 Aug 2019 23:48:05 -0500 Subject: [PATCH] [Core] Only wait on the main thread if it actually exists. --- src/xenia/emulator.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xenia/emulator.cc b/src/xenia/emulator.cc index f413049b4..b1d976c9e 100644 --- a/src/xenia/emulator.cc +++ b/src/xenia/emulator.cc @@ -581,7 +581,9 @@ bool Emulator::ExceptionCallback(Exception* ex) { void Emulator::WaitUntilExit() { while (true) { - xe::threading::Wait(main_thread_->thread(), false); + if (main_thread_) { + xe::threading::Wait(main_thread_->thread(), false); + } if (restoring_) { restore_fence_.Wait();