From 510b8da8874bdafa0bd72efbd9d0521ccc4d964d Mon Sep 17 00:00:00 2001 From: Renaud G Date: Mon, 9 Apr 2018 10:24:20 +0200 Subject: -Fix #4 crash with mishaped command. And prevent this error to happen with other nodes. --- node/keepdiceexecnode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'node/keepdiceexecnode.cpp') diff --git a/node/keepdiceexecnode.cpp b/node/keepdiceexecnode.cpp index 547e343..89cda38 100644 --- a/node/keepdiceexecnode.cpp +++ b/node/keepdiceexecnode.cpp @@ -40,7 +40,7 @@ void KeepDiceExecNode::run(ExecutionNode* previous) { return; } - DiceResult* previousDiceResult = static_cast(previous->getResult()); + DiceResult* previousDiceResult = dynamic_cast(previous->getResult()); m_result->setPrevious(previousDiceResult); if(nullptr!=previousDiceResult) { -- cgit v1.2.3-70-g09d2