From 56245e3f3cd280c0f1d29f01b4c7ac55b8f4bdd4 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sat, 15 Dec 2018 11:27:11 +0100 Subject: prevent crash when result is null. --- node/variablenode.cpp | 10 +++++++--- 1 file 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); + } } } } -- cgit v1.2.3-70-g09d2