aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/dice/tst_dice.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/dice/tst_dice.cpp b/tests/dice/tst_dice.cpp
index 98dcdc1..8d6c1ad 100644
--- a/tests/dice/tst_dice.cpp
+++ b/tests/dice/tst_dice.cpp
@@ -850,7 +850,11 @@ void TestDice::ifTest()
node.run(nullptr);
- auto text= dynamic_cast<StringResult*>(ifNode.getNextNode()->getResult())->getText();
+ QString text;
+ if(nullptr != ifNode.getNextNode())
+ text= dynamic_cast<StringResult*>(ifNode.getNextNode()->getResult())->getText();
+ else
+ text= dynamic_cast<StringResult*>(ifNode.getResult())->getText();
QCOMPARE(expectedResult, text);