aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2018-12-15 11:27:11 +0100
committerRenaud G <renaud@rolisteam.org>2018-12-15 11:27:11 +0100
commit56245e3f3cd280c0f1d29f01b4c7ac55b8f4bdd4 (patch)
treee16fa53e778f39cfffa823c0dd46b4a418246f59
parentd442933e69771ddfdd4a6dd5f2c71526859394cb (diff)
downloadOneRoll-56245e3f3cd280c0f1d29f01b4c7ac55b8f4bdd4.tar.gz
OneRoll-56245e3f3cd280c0f1d29f01b4c7ac55b8f4bdd4.zip
prevent crash when result is null.
-rw-r--r--node/variablenode.cpp10
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);
+ }
}
}
}