diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/UI/Window.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp index 629db12c2..92e69e8b7 100644 --- a/src/UI/Window.cpp +++ b/src/UI/Window.cpp @@ -328,11 +328,13 @@ bool cWindow::ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse) (*itr)->OnPlayerRemoved(a_Player); } // for itr - m_SlotAreas[] - m_OpenedBy.remove(&a_Player); - - if ((m_WindowType != wtInventory) && m_OpenedBy.empty()) + if (m_WindowType != wtInventory) { - Destroy(); + m_OpenedBy.remove(&a_Player); + if (m_OpenedBy.empty()) + { + Destroy(); + } } } if (m_IsDestroyed) |