diff options
-rw-r--r-- | tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp index 7741803224..7538eaf378 100644 --- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp @@ -246,8 +246,10 @@ void tst_QSharedPointer::basics() QCOMPARE(ptr.data(), aData); QCOMPARE(ptr.operator->(), aData); - Data &dataReference = *ptr; - QCOMPARE(&dataReference, aData); + if (!isNull) { + Data &dataReference = *ptr; + QCOMPARE(&dataReference, aData); + } QVERIFY(ptr == aData); QVERIFY(!(ptr != aData)); |