Skip to content

Commit

Permalink
Fix segfault in MapWnd when resigning game - ref 69ff23d
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianbroher committed Dec 31, 2016
1 parent bb4cfdf commit 78182d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion UI/MapWnd.cpp
Expand Up @@ -6312,8 +6312,9 @@ void MapWnd::ChatMessageSentSlot()
{}

void MapWnd::CloseAllPopups() {
for (MapWndPopup* popup : m_popups) {
for (std::list<MapWndPopup*>::iterator it = m_popups.begin(); it != m_popups.end(); ) {
// get popup and increment iterator first since closing the popup will change this list by removing the popup
MapWndPopup* popup = *it++;
popup->Close();
}
// clear list
Expand Down

0 comments on commit 78182d4

Please sign in to comment.