mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2026-10-12 02:18:48 +00:00
Fix occasional segfault on exit caused by emuIsActive being called after
the EmuThread is destroyed
This commit is contained in:
@@ -161,6 +161,7 @@ EmuInstance::~EmuInstance()
|
||||
emuThread->emuExit();
|
||||
emuThread->wait();
|
||||
delete emuThread;
|
||||
emuThread = nullptr;
|
||||
|
||||
net.UnregisterInstance(instanceID);
|
||||
|
||||
@@ -344,6 +345,8 @@ void EmuInstance::osdAddMessage(unsigned int color, const char* fmt, ...)
|
||||
|
||||
bool EmuInstance::emuIsActive()
|
||||
{
|
||||
if (emuThread == nullptr)
|
||||
return false;
|
||||
return emuThread->emuIsActive();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user