diff options
author | Jim Albamont <jim.albamont@kdab.com> | 2019-09-11 09:52:05 -0700 |
---|---|---|
committer | Jim Albamont <jim.albamont@kdab.com> | 2019-09-13 08:36:21 -0700 |
commit | c89997143cd6e51916924b71c8b0bf8705480a67 (patch) | |
tree | 2d416eba5087c7ba5fbe1371960b47cc6924e57b /tests/auto/core | |
parent | 7814da64942c4566e2fa9c9e2bd2a1e169e7fab9 (diff) |
Fix crash in tst_QShaderProgram
We install the TestArbiter on "this" in one test and the TestArbiter is
destroyed at the end of that test. In a second test we again install a
TestArbiter on "this". The call to QNode::setArbiter tries to access
the desroyed arbiter (m_changeArbiter->removeDirtyFrontEndNode(q))
resulting in a crash.
Need to set a null arbiter on "this" to properly clean up.
Also fix a few other incorrect uses that weren't crashing.
Change-Id: Iee2ea8210df971f934e2f188748803c8745c8278
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'tests/auto/core')
-rw-r--r-- | tests/auto/core/qskeleton/tst_qskeleton.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/core/qskeleton/tst_qskeleton.cpp b/tests/auto/core/qskeleton/tst_qskeleton.cpp index 6ad6e538c..04c9bf7a1 100644 --- a/tests/auto/core/qskeleton/tst_qskeleton.cpp +++ b/tests/auto/core/qskeleton/tst_qskeleton.cpp @@ -193,6 +193,9 @@ private Q_SLOTS: QCOMPARE(spy.count(), 0); QCOMPARE(arbiter.events.size(), 0); QCOMPARE(jointCount(), newJointCount); + + // Cleanup + QNodePrivate::get(this)->setArbiter(nullptr); } }; |