summaryrefslogtreecommitdiffstats
path: root/logger/QsLog.cpp
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-12-11 13:17:23 -0600
committerAndrew <forkk@forkk.net>2013-12-11 13:17:23 -0600
commitf3fffd52594065995d4c355de1571b36b2f2bbeb (patch)
treecb9654d8ba5449d0e0ec1113a8ad1b739b73a1c4 /logger/QsLog.cpp
parent35ec5997308ec48f45c3a8d6483bc83dc1c1ef09 (diff)
downloadMultiMC-f3fffd52594065995d4c355de1571b36b2f2bbeb.tar
MultiMC-f3fffd52594065995d4c355de1571b36b2f2bbeb.tar.gz
MultiMC-f3fffd52594065995d4c355de1571b36b2f2bbeb.tar.lz
MultiMC-f3fffd52594065995d4c355de1571b36b2f2bbeb.tar.xz
MultiMC-f3fffd52594065995d4c355de1571b36b2f2bbeb.zip
Remove QsLog destinations when they are destroyed.
This fixes some issues where MultiMC was segfaulting on exit because things were trying to write to the logger while they were being destroyed, but the destinations had already been destroyed and were left in the list.
Diffstat (limited to 'logger/QsLog.cpp')
-rw-r--r--logger/QsLog.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/logger/QsLog.cpp b/logger/QsLog.cpp
index 8cf68a53..87d7a412 100644
--- a/logger/QsLog.cpp
+++ b/logger/QsLog.cpp
@@ -134,4 +134,9 @@ void Logger::write(const QString &message)
}
}
+void Logger::removeDestination(Destination* destination)
+{
+ d->destList.removeAll(destination);
+}
+
} // end namespace