telepathy-qt: TestStreamTubeHandlers: Avoid a crash on test failed
Alexandr Akulich
kaffeine at kemper.freedesktop.org
Mon Nov 11 17:28:14 UTC 2019
Module: telepathy-qt
Branch: master
Commit: ddb9739b79688cb172179e973f0a2cce44bd10d2
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=ddb9739b79688cb172179e973f0a2cce44bd10d2
Author: Alexander Akulich <akulichalexander at gmail.com>
Date: Sun Oct 27 19:09:35 2019 +0300
TestStreamTubeHandlers: Avoid a crash on test failed
---
tests/dbus/stream-tube-handlers.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/dbus/stream-tube-handlers.cpp b/tests/dbus/stream-tube-handlers.cpp
index 67c15b0a..1530aad9 100644
--- a/tests/dbus/stream-tube-handlers.cpp
+++ b/tests/dbus/stream-tube-handlers.cpp
@@ -1929,8 +1929,10 @@ void TestStreamTubeHandlers::cleanupTestCase()
mAM.reset();
mAcc.reset();
- QCOMPARE(mConn->disconnect(), true);
- delete mConn;
+ if (mConn) {
+ QCOMPARE(mConn->disconnect(), true);
+ delete mConn;
+ }
cleanupTestCaseImpl();
}
More information about the telepathy-commits
mailing list