summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Main.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-03-22 12:42:49 +0100
committerLéo Lam <leo@innovatetechnologi.es>2017-03-25 23:24:02 +0100
commit77b389bf997e3816f50b08d89ade9e347c002a19 (patch)
tree4ec18c7e9a4ed9dce935950b1d53d3ba92700b0d /Source/Core/DolphinWX/Main.cpp
parent86e6b44271fcfddb68b2680525f23217c4360198 (diff)
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.
Diffstat (limited to 'Source/Core/DolphinWX/Main.cpp')
-rw-r--r--Source/Core/DolphinWX/Main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp
index 934697ddab..37bd1b63bd 100644
--- a/Source/Core/DolphinWX/Main.cpp
+++ b/Source/Core/DolphinWX/Main.cpp
@@ -91,7 +91,6 @@ bool DolphinApp::OnCmdLineParsed(wxCmdLineParser& parser)
bool DolphinApp::OnInit()
{
- std::lock_guard<std::mutex> lk(s_init_mutex);
if (!wxApp::OnInit())
return false;
@@ -110,6 +109,8 @@ bool DolphinApp::OnInit()
ParseCommandLine();
+ std::lock_guard<std::mutex> lk(s_init_mutex);
+
UICommon::SetUserDirectory(m_user_path.ToStdString());
UICommon::CreateDirectories();
InitLanguageSupport(); // The language setting is loaded from the user directory