fix(color): Fix infinite loop/crash with some uses of POPUP_WARNING/POPUP_INFORMATION (#3068)
Prevent infinite loop and crash if POPUP_WARNING or POPUP_INFORMATION are used from within code that is called from a 'Menu' line button.
This commit is contained in:
@@ -26,6 +26,11 @@ static void _run_popup_dialog(const char* title, const char* msg,
|
||||
const char* info = nullptr)
|
||||
{
|
||||
bool running = true;
|
||||
|
||||
// reset input devices to avoid
|
||||
// RELEASED/CLICKED to be called in a loop
|
||||
lv_indev_reset(nullptr, nullptr);
|
||||
|
||||
auto md = new MessageDialog(MainWindow::instance(), title, msg);
|
||||
md->setCloseHandler([&]() { running = false; });
|
||||
if (info) {
|
||||
|
||||
Reference in New Issue
Block a user