diff options
| author | 2018-12-15 11:27:11 +0100 | |
|---|---|---|
| committer | 2018-12-15 11:27:11 +0100 | |
| commit | 56245e3f3cd280c0f1d29f01b4c7ac55b8f4bdd4 (patch) | |
| tree | e16fa53e778f39cfffa823c0dd46b4a418246f59 /node/variablenode.cpp | |
| parent | d442933e69771ddfdd4a6dd5f2c71526859394cb (diff) | |
| download | OneRoll-56245e3f3cd280c0f1d29f01b4c7ac55b8f4bdd4.tar.gz OneRoll-56245e3f3cd280c0f1d29f01b4c7ac55b8f4bdd4.zip | |
prevent crash when result is null.
Diffstat (limited to 'node/variablenode.cpp')
| -rw-r--r-- | node/variablenode.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/node/variablenode.cpp b/node/variablenode.cpp index fafc722..c0d491c 100644 --- a/node/variablenode.cpp +++ b/node/variablenode.cpp @@ -14,10 +14,14 @@ void VariableNode::run(ExecutionNode *previous) value = ParsingToolBox::getLatestNode(value); if(nullptr != value) { - m_result = value->getResult()->getCopy(); - if(nullptr!=m_nextNode) + auto result = value->getResult(); + if(result) { - m_nextNode->run(this); + m_result = result->getCopy(); + if(nullptr!=m_nextNode) + { + m_nextNode->run(this); + } } } } |