aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/booleancondition.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2019-07-25 22:29:20 +0200
committerRenaud G <renaud@rolisteam.org>2019-07-25 22:29:20 +0200
commit8b04d886845be5c3b57caae4d96b53133c51ab14 (patch)
tree0c22e33e8f9246b38dd1cac901b0ea11fc19ca07 /booleancondition.cpp
parent611aa0defd63ebc3b4e3d16a86c495a9af120728 (diff)
downloadOneRoll-8b04d886845be5c3b57caae4d96b53133c51ab14.tar.gz
OneRoll-8b04d886845be5c3b57caae4d96b53133c51ab14.zip
Fix crash found by afl
Diffstat (limited to 'booleancondition.cpp')
-rw-r--r--booleancondition.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/booleancondition.cpp b/booleancondition.cpp
index c81f5ab..6747727 100644
--- a/booleancondition.cpp
+++ b/booleancondition.cpp
@@ -159,5 +159,8 @@ qint64 BooleanCondition::valueToScalar() const
m_value->run(nullptr);
auto result= m_value->getResult();
- return result->getResult(Dice::RESULT_TYPE::SCALAR).toInt();
+ if(result)
+ return result->getResult(Dice::RESULT_TYPE::SCALAR).toInt();
+ else
+ return 0;
}