From ba4f536cac97fd6acbe69fdb8d76bd7a1a026557 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sat, 28 Jan 2017 00:47:59 +0100 Subject: -fix crash memory in sort result. TODO: Optimization about the copy of die. Perhaps using reference will be better. --- node/sortresult.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'node') diff --git a/node/sortresult.cpp b/node/sortresult.cpp index 8dee7d5..d864aa2 100644 --- a/node/sortresult.cpp +++ b/node/sortresult.cpp @@ -41,14 +41,18 @@ void SortResultNode::run(ExecutionNode* node) DiceResult* previousDiceResult = dynamic_cast(node->getResult()); m_diceResult->setPrevious(previousDiceResult); if(NULL!=previousDiceResult) - { + { QList diceList=previousDiceResult->getResultList(); QList diceList2=m_diceResult->getResultList(); // half-interval search sorting for(int i = 0; idisplayed(); + int j =0; bool found = false; int start = 0; -- cgit v1.2.3-70-g09d2