[apps] Prevent duplicating functions to avoid crashing at exit (when

function stores are deleted)

Change-Id: Ia0efb528f02efaaba87eccd48385163b48593387
This commit is contained in:
Émilie Feral
2017-03-22 15:32:44 +01:00
parent 7e1f0a4d01
commit 8da950d740
2 changed files with 2 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ void CartesianFunctionStore::removeFunction(Shared::Function * f) {
for (int j = i; j<m_numberOfFunctions; j++) {
m_functions[j] = m_functions[j+1];
}
m_functions[m_numberOfFunctions] = CartesianFunction("", KDColorBlack);
}
int CartesianFunctionStore::maxNumberOfFunctions() {