summaryrefslogtreecommitdiffstats
path: root/application/MultiMC.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-11-07 01:54:00 +0100
committerPetr Mrázek <peterix@gmail.com>2016-11-07 01:54:00 +0100
commit07589b5114ddfc389690fdd614ee77fa411c6459 (patch)
tree40f1c92021ce39349bff338136f4ba42849972f3 /application/MultiMC.cpp
parent7cff5ba2e119ae675661c32811da85cf5efacea5 (diff)
downloadMultiMC-07589b5114ddfc389690fdd614ee77fa411c6459.tar
MultiMC-07589b5114ddfc389690fdd614ee77fa411c6459.tar.gz
MultiMC-07589b5114ddfc389690fdd614ee77fa411c6459.tar.lz
MultiMC-07589b5114ddfc389690fdd614ee77fa411c6459.tar.xz
MultiMC-07589b5114ddfc389690fdd614ee77fa411c6459.zip
NOISSUE shut down logger when MultiMC exits
Prevents crash bugs...
Diffstat (limited to 'application/MultiMC.cpp')
-rw-r--r--application/MultiMC.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index 3c637077..0ca12adb 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -318,6 +318,7 @@ MultiMC::~MultiMC()
WriteConsole(out, endline, strlen(endline), &written, NULL);
}
#endif
+ shutdownLogger();
}
void MultiMC::messageReceived(const QString& message)
@@ -457,6 +458,11 @@ void MultiMC::initLogger()
logFile->open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate);
}
+void MultiMC::shutdownLogger()
+{
+ qInstallMessageHandler(nullptr);
+}
+
void MultiMC::initInstances()
{
auto InstDirSetting = m_settings->getSetting("InstanceDir");