From dfe74dc1cb8a236853ccc614b9825faca3ceba9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Thu, 1 Aug 2019 14:03:08 +0200 Subject: [PATCH] [apps/calculationStore] Remove falty assertion --- apps/calculation/calculation_store.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/calculation/calculation_store.cpp b/apps/calculation/calculation_store.cpp index f39280383..c566f0f73 100644 --- a/apps/calculation/calculation_store.cpp +++ b/apps/calculation/calculation_store.cpp @@ -133,7 +133,9 @@ void CalculationStore::deleteCalculationAtIndex(int i) { } void CalculationStore::deleteAll() { - assert(!m_slidedBuffer); + /* We might call deleteAll because the app closed due to a pool allocation + * failure, so we cannot assert that m_slidedBuffer is false. */ + m_slidedBuffer = false; m_bufferEnd = m_buffer; m_numberOfCalculations = 0; resetMemoizedModelsAfterCalculationIndex(-1);