diff options
-rw-r--r-- | common/log.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/log.cpp b/common/log.cpp index 3edc89a..ac87c84 100644 --- a/common/log.cpp +++ b/common/log.cpp | |||
@@ -270,12 +270,17 @@ Q_GLOBAL_STATIC(DebugAreaCollector, sDebugAreaCollector); | |||
270 | 270 | ||
271 | QSet<QString> Sink::Log::debugAreas() | 271 | QSet<QString> Sink::Log::debugAreas() |
272 | { | 272 | { |
273 | return sDebugAreaCollector->debugAreas(); | 273 | if (!sDebugAreaCollector.isDestroyed()) { |
274 | return sDebugAreaCollector->debugAreas(); | ||
275 | } | ||
276 | return {}; | ||
274 | } | 277 | } |
275 | 278 | ||
276 | static void collectDebugArea(const QString &debugArea) | 279 | static void collectDebugArea(const QString &debugArea) |
277 | { | 280 | { |
278 | sDebugAreaCollector->add(debugArea); | 281 | if (!sDebugAreaCollector.isDestroyed()) { |
282 | sDebugAreaCollector->add(debugArea); | ||
283 | } | ||
279 | } | 284 | } |
280 | 285 | ||
281 | static bool containsItemStartingWith(const QByteArray &pattern, const QByteArrayList &list) | 286 | static bool containsItemStartingWith(const QByteArray &pattern, const QByteArrayList &list) |