diff options
| author | 2019-07-25 22:29:20 +0200 | |
|---|---|---|
| committer | 2019-07-25 22:29:20 +0200 | |
| commit | 8b04d886845be5c3b57caae4d96b53133c51ab14 (patch) | |
| tree | 0c22e33e8f9246b38dd1cac901b0ea11fc19ca07 /booleancondition.cpp | |
| parent | 611aa0defd63ebc3b4e3d16a86c495a9af120728 (diff) | |
| download | OneRoll-8b04d886845be5c3b57caae4d96b53133c51ab14.tar.gz OneRoll-8b04d886845be5c3b57caae4d96b53133c51ab14.zip | |
Fix crash found by afl
Diffstat (limited to 'booleancondition.cpp')
| -rw-r--r-- | booleancondition.cpp | 5 |
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; } |