summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorPeter Hartmann <peter.hartmann@nokia.com>2009-10-19 14:20:23 (GMT)
committerPeter Hartmann <peter.hartmann@nokia.com>2009-10-19 15:14:27 (GMT)
commitade25abbe4009c2f491cbd05e81903317d91ec82 (patch)
tree392d03cd794979cd9579eb66a4b849c1be111b8d /src/testlib
parenta13cd1b97b352dc2e583b3d9b6254c7086218c3b (diff)
downloadQt-ade25abbe4009c2f491cbd05e81903317d91ec82.zip
Qt-ade25abbe4009c2f491cbd05e81903317d91ec82.tar.gz
Qt-ade25abbe4009c2f491cbd05e81903317d91ec82.tar.bz2
QTestLib: do not assert if testLogger object is already destroyed
... because when dumping signals we might get QThread::finished() etc. when closing the program, and then the testLogger instance might already be deleted. Reviewed-by: Jesper
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestlog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index 5b78976..da695dc 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -317,10 +317,10 @@ void QTestLog::warn(const char *msg)
void QTestLog::info(const char *msg, const char *file, int line)
{
- QTEST_ASSERT(QTest::testLogger);
QTEST_ASSERT(msg);
- QTest::testLogger->addMessage(QAbstractTestLogger::Info, msg, file, line);
+ if (QTest::testLogger)
+ QTest::testLogger->addMessage(QAbstractTestLogger::Info, msg, file, line);
}
void QTestLog::setLogMode(LogMode mode)