[Core] Only wait on the main thread if it actually exists.
This commit is contained in:
parent
4970fc8673
commit
e48f4ce004
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue