summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/MultiMC.cpp6
-rw-r--r--application/MultiMC.h1
2 files changed, 7 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");
diff --git a/application/MultiMC.h b/application/MultiMC.h
index b4087ef3..c416b8c0 100644
--- a/application/MultiMC.h
+++ b/application/MultiMC.h
@@ -167,6 +167,7 @@ private slots:
private:
void initLogger();
+ void shutdownLogger();
void initIcons();
void initThemes();
void initGlobalSettings();