diff --git a/apps/graph/list/parameter_controller.cpp b/apps/graph/list/parameter_controller.cpp index b5551b8c0..6a445ad24 100644 --- a/apps/graph/list/parameter_controller.cpp +++ b/apps/graph/list/parameter_controller.cpp @@ -80,10 +80,15 @@ bool ParameterController::handleEnter() { } case 2: { - m_functionStore->removeFunction(m_function); - StackViewController * stack = (StackViewController *)(parentResponder()); - stack->pop(); - return true; + if (m_functionStore->numberOfFunctions() > 1) { + m_functionStore->removeFunction(m_function); + StackViewController * stack = (StackViewController *)(parentResponder()); + stack->pop(); + return true; + } else { + // TODO: add an warning "no function to delete!" + return false; + } } default: {