[Core] Only wait on the main thread if it actually exists.
This commit is contained in:
@@ -581,7 +581,9 @@ bool Emulator::ExceptionCallback(Exception* ex) {
|
|||||||
|
|
||||||
void Emulator::WaitUntilExit() {
|
void Emulator::WaitUntilExit() {
|
||||||
while (true) {
|
while (true) {
|
||||||
xe::threading::Wait(main_thread_->thread(), false);
|
if (main_thread_) {
|
||||||
|
xe::threading::Wait(main_thread_->thread(), false);
|
||||||
|
}
|
||||||
|
|
||||||
if (restoring_) {
|
if (restoring_) {
|
||||||
restore_fence_.Wait();
|
restore_fence_.Wait();
|
||||||
|
|||||||
Reference in New Issue
Block a user