aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/result
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2017-01-28 00:23:49 +0100
committerRenaud G <renaud@rolisteam.org>2017-01-28 00:23:49 +0100
commitb82e546e0a7b9687282659dd1d60005eb2268fe0 (patch)
tree9bb1898b21a56175aacf003233d6c30506871805 /result
parent134665999d9291597696c3d071474865a5b9515d (diff)
downloadOneRoll-b82e546e0a7b9687282659dd1d60005eb2268fe0.tar.gz
OneRoll-b82e546e0a7b9687282659dd1d60005eb2268fe0.zip
-useless protection but just in case some physical laws changed.
Diffstat (limited to 'result')
-rw-r--r--result/diceresult.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/result/diceresult.cpp b/result/diceresult.cpp
index 9f9fbf8..aa39524 100644
--- a/result/diceresult.cpp
+++ b/result/diceresult.cpp
@@ -51,8 +51,11 @@ void DiceResult::setResultList(QList<Die*> list)
}
DiceResult::~DiceResult()
{
- qDeleteAll(m_diceValues.begin(), m_diceValues.end());
- m_diceValues.clear();
+ if(!m_diceValues.isEmpty())
+ {
+ qDeleteAll(m_diceValues.begin(), m_diceValues.end());
+ m_diceValues.clear();
+ }
}
QVariant DiceResult::getResult(RESULT_TYPE type)
{