diff options
| author | 2019-07-25 22:29:20 +0200 | |
|---|---|---|
| committer | 2019-07-25 22:29:20 +0200 | |
| commit | 8b04d886845be5c3b57caae4d96b53133c51ab14 (patch) | |
| tree | 0c22e33e8f9246b38dd1cac901b0ea11fc19ca07 /node/scalaroperatornode.cpp | |
| parent | 611aa0defd63ebc3b4e3d16a86c495a9af120728 (diff) | |
| download | OneRoll-8b04d886845be5c3b57caae4d96b53133c51ab14.tar.gz OneRoll-8b04d886845be5c3b57caae4d96b53133c51ab14.zip | |
Fix crash found by afl
Diffstat (limited to 'node/scalaroperatornode.cpp')
| -rw-r--r-- | node/scalaroperatornode.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/node/scalaroperatornode.cpp b/node/scalaroperatornode.cpp index 9edbcdc..821150b 100644 --- a/node/scalaroperatornode.cpp +++ b/node/scalaroperatornode.cpp @@ -66,6 +66,13 @@ void ScalarOperatorNode::run(ExecutionNode* previous) m_internalNode->getResult()->setPrevious(previousResult); } + if(internalResult == nullptr) + { + m_errors.insert(Dice::ERROR_CODE::NO_VALID_RESULT, + QObject::tr("No Valid result in arithmetic operatoion: %1").arg(toString(true))); + return; + } + switch(m_arithmeticOperator) { case Die::PLUS: |