aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/keepdiceexecnode.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2018-04-09 10:24:20 +0200
committerRenaud G <renaud@rolisteam.org>2018-04-09 10:26:21 +0200
commit510b8da8874bdafa0bd72efbd9d0521ccc4d964d (patch)
treee6b4383a262796e8b67b8992ec21d15cf7a29acb /node/keepdiceexecnode.cpp
parent5037bbc102fec39fbdef810427c31cb0a1722709 (diff)
downloadOneRoll-510b8da8874bdafa0bd72efbd9d0521ccc4d964d.tar.gz
OneRoll-510b8da8874bdafa0bd72efbd9d0521ccc4d964d.zip
-Fix #4 crash with mishaped command.
And prevent this error to happen with other nodes.
Diffstat (limited to 'node/keepdiceexecnode.cpp')
-rw-r--r--node/keepdiceexecnode.cpp2
1 files changed, 1 insertions, 1 deletions
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<DiceResult*>(previous->getResult());
+ DiceResult* previousDiceResult = dynamic_cast<DiceResult*>(previous->getResult());
m_result->setPrevious(previousDiceResult);
if(nullptr!=previousDiceResult)
{