Fix Emulator::Pause() segfault
This commit is contained in:
@@ -2767,6 +2767,7 @@ bool Emulator::Pause(bool freeze_emulation, bool show_resume_message)
|
|||||||
std::unique_ptr<named_thread<decltype(refresh_l)>> m_thread;
|
std::unique_ptr<named_thread<decltype(refresh_l)>> m_thread;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
g_fxo->need<thread_t>();
|
||||||
g_fxo->get<thread_t>().m_thread.reset();
|
g_fxo->get<thread_t>().m_thread.reset();
|
||||||
g_fxo->get<thread_t>().m_thread = std::make_unique<named_thread<decltype(refresh_l)>>("Pause Message Thread"sv, std::move(refresh_l));
|
g_fxo->get<thread_t>().m_thread = std::make_unique<named_thread<decltype(refresh_l)>>("Pause Message Thread"sv, std::move(refresh_l));
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user