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:
Léo Lam 2017-03-22 12:42:49 +01:00
parent 86e6b44271
commit 77b389bf99
1 changed files with 2 additions and 1 deletions

View File

@ -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