From 731777476fe1648f6835d24a243112d14d57cfd2 Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Fri, 28 Oct 2016 15:29:14 +0800 Subject: [PATCH] Check for window_event_result::deleted for polygon_models_viewer polling loop This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one. --- similar/main/menu.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/similar/main/menu.cpp b/similar/main/menu.cpp index c67857e39..97644d914 100644 --- a/similar/main/menu.cpp +++ b/similar/main/menu.cpp @@ -2380,8 +2380,7 @@ static void polygon_models_viewer() return; } - while (window_exists(wind)) - event_process(); + while (event_process() != window_event_result::deleted) {} } namespace dsx {