aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2019-12-25 03:48:11 +0100
committerRenaud G <renaud@rolisteam.org>2019-12-25 03:48:11 +0100
commit825bcda767d2bab9f470d81cd76b9e5985fbea9c (patch)
treed117fe3469822f4bac31725beec5793abf332c4a /tests
parentadf9031cf7ddf06d8806a2b8e4494984a21608b5 (diff)
downloadOneRoll-825bcda767d2bab9f470d81cd76b9e5985fbea9c.tar.gz
OneRoll-825bcda767d2bab9f470d81cd76b9e5985fbea9c.zip
Fix test of IF
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);