mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
WX: Move init mutex lock to after command line
Calling std::exit while having a mutex locked leads to an assertion. Moving the lock is fine, since all it protects against is really just UICommon.
This commit is contained in:
parent
86e6b44271
commit
77b389bf99
1 changed files with 2 additions and 1 deletions
|
@ -91,7 +91,6 @@ bool DolphinApp::OnCmdLineParsed(wxCmdLineParser& parser)
|
||||||
|
|
||||||
bool DolphinApp::OnInit()
|
bool DolphinApp::OnInit()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(s_init_mutex);
|
|
||||||
if (!wxApp::OnInit())
|
if (!wxApp::OnInit())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -110,6 +109,8 @@ bool DolphinApp::OnInit()
|
||||||
|
|
||||||
ParseCommandLine();
|
ParseCommandLine();
|
||||||
|
|
||||||
|
std::lock_guard<std::mutex> lk(s_init_mutex);
|
||||||
|
|
||||||
UICommon::SetUserDirectory(m_user_path.ToStdString());
|
UICommon::SetUserDirectory(m_user_path.ToStdString());
|
||||||
UICommon::CreateDirectories();
|
UICommon::CreateDirectories();
|
||||||
InitLanguageSupport(); // The language setting is loaded from the user directory
|
InitLanguageSupport(); // The language setting is loaded from the user directory
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue