diff options
author | Peter Hartmann <peter.hartmann@nokia.com> | 2009-10-19 14:20:23 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@nokia.com> | 2009-10-19 15:14:27 (GMT) |
commit | ade25abbe4009c2f491cbd05e81903317d91ec82 (patch) | |
tree | 392d03cd794979cd9579eb66a4b849c1be111b8d | |
parent | a13cd1b97b352dc2e583b3d9b6254c7086218c3b (diff) | |
download | Qt-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
-rw-r--r-- | src/testlib/qtestlog.cpp | 4 |
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) |