From 90ba459dc7545e8b9f84ce1234e0a46ce480887a Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Mon, 31 Aug 2020 21:24:24 +0200 Subject: [PATCH] Segfault in Menu --- radio/src/thirdparty/libopenui/src/menu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/radio/src/thirdparty/libopenui/src/menu.cpp b/radio/src/thirdparty/libopenui/src/menu.cpp index 8b3ccf6d9..658397a63 100644 --- a/radio/src/thirdparty/libopenui/src/menu.cpp +++ b/radio/src/thirdparty/libopenui/src/menu.cpp @@ -49,12 +49,12 @@ void MenuBody::onEvent(event_t event) select(0); } else { - Window::onEvent(event); // the window above will be closed on event lines[selectedIndex].onPress(); Menu * menu = getParentMenu(); - if (menu->multiple) { + if (menu->multiple) menu->invalidate(); - } + else + menu->deleteLater(); } } }