summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlogging.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-10-11 16:12:21 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-10-11 16:12:35 +0200
commitd0eb444a49f6064ecb896f62276e060cd8a4b1e8 (patch)
tree34d8dd637baf665225ada73e76604531cd2c75e5 /src/corelib/global/qlogging.cpp
parentda0cb32b8ee7cc4a991a59420a411898e63a660e (diff)
parent894f86709080fe8d20875b402adce679963c49c2 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r--src/corelib/global/qlogging.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 694935b326b..063e94069f9 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -927,8 +927,10 @@ static void qt_message_print(QtMsgType msgType, const QMessageLogContext &contex
#ifndef QT_BOOTSTRAPPED
// qDebug, qWarning, ... macros do not check whether category is enabled
if (!context.category || (strcmp(context.category, "default") == 0)) {
- if (!QLoggingCategory::defaultCategory().isEnabled(msgType))
- return;
+ if (QLoggingCategory *defaultCategory = &QLoggingCategory::defaultCategory()) {
+ if (!defaultCategory->isEnabled(msgType))
+ return;
+ }
}
#endif