Skip to content

Commit edb725e

Browse files
committed
remove deleted window from windowmap after receiving all the leftover events
Closes umlaeute#136
1 parent 3788266 commit edb725e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Output/gemglutwindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,15 +407,15 @@ void gemglutwindow :: destroy(void)
407407
void gemglutwindow :: destroyMess(void)
408408
{
409409
if(makeCurrent()) {
410-
s_windowmap.erase(m_window);
411-
412410
int window=m_window;
413411
m_window=0; // so that we no longer receive any event
414412
glutCloseFunc (NULL);
415413
glutDestroyWindow(window);
416414
glutMainLoopEvent();
417415
glutMainLoopEvent();
418416

417+
/* now that the window is destroyed, remove it from the list of available windows */
418+
s_windowmap.erase(window);
419419
}
420420
destroy();
421421
}

0 commit comments

Comments
 (0)