diff --git a/similar/main/menu.cpp b/similar/main/menu.cpp index d6ed5c4a2..c67857e39 100644 --- a/similar/main/menu.cpp +++ b/similar/main/menu.cpp @@ -192,7 +192,12 @@ void show_menus(void) { if (!i) break; - if (window_exists(i)) + + // Hidden windows don't receive events, so the only way to close is outside its handler + // Which there should be no cases of here + // window_exists could return a false positive if a new window was created + // with the same pointer value as the deleted one, so killing window_exists (call and function) + // if (window_exists(i)) window_set_visible(i, 1); } menus[0] = NULL;