NOISSUE shut down logger when MultiMC exits
Prevents crash bugs...
This commit is contained in:
parent
7cff5ba2e1
commit
07589b5114
@ -318,6 +318,7 @@ MultiMC::~MultiMC()
|
|||||||
WriteConsole(out, endline, strlen(endline), &written, NULL);
|
WriteConsole(out, endline, strlen(endline), &written, NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
shutdownLogger();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiMC::messageReceived(const QString& message)
|
void MultiMC::messageReceived(const QString& message)
|
||||||
@ -457,6 +458,11 @@ void MultiMC::initLogger()
|
|||||||
logFile->open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate);
|
logFile->open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MultiMC::shutdownLogger()
|
||||||
|
{
|
||||||
|
qInstallMessageHandler(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
void MultiMC::initInstances()
|
void MultiMC::initInstances()
|
||||||
{
|
{
|
||||||
auto InstDirSetting = m_settings->getSetting("InstanceDir");
|
auto InstDirSetting = m_settings->getSetting("InstanceDir");
|
||||||
|
@ -167,6 +167,7 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void initLogger();
|
void initLogger();
|
||||||
|
void shutdownLogger();
|
||||||
void initIcons();
|
void initIcons();
|
||||||
void initThemes();
|
void initThemes();
|
||||||
void initGlobalSettings();
|
void initGlobalSettings();
|
||||||
|
Loading…
Reference in New Issue
Block a user