From 851c88697ec413ed9ebae80796999c5449f3fece Mon Sep 17 00:00:00 2001
From: Jared Adams <jaxad0127@gmail.com>
Date: Thu, 25 Mar 2010 14:30:45 -0600
Subject: Remove InventoryWindows from their instances list when deleted

---
 src/gui/inventorywindow.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 18705ada..425ac15f 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -143,6 +143,7 @@ InventoryWindow::InventoryWindow(Inventory *inventory, bool isMainInventory):
 
 InventoryWindow::~InventoryWindow()
 {
+    instances.remove(this);
     mInventory->removeInventoyListener(this);
 }
 
-- 
cgit v1.2.3-70-g09d2