[apps] Ensure to reset pointers when their content have been deleted

Change-Id: I4c236c045cbe5e6ba215cbf56b27eba92133b675
This commit is contained in:
Émilie Feral
2017-02-09 09:47:43 +01:00
parent 0d41808d90
commit 4f7658b271
8 changed files with 19 additions and 3 deletions

View File

@@ -36,9 +36,11 @@ void Function::setColor(KDColor color) {
Function::~Function() {
if (m_layout != nullptr) {
delete m_layout;
m_layout = nullptr;
}
if (m_expression != nullptr) {
delete m_expression;
m_expression = nullptr;
}
}