summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/manaserv/inventoryhandler.cpp5
-rw-r--r--src/net/manaserv/inventoryhandler.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/net/manaserv/inventoryhandler.cpp b/src/net/manaserv/inventoryhandler.cpp
index 94494319..67c79a17 100644
--- a/src/net/manaserv/inventoryhandler.cpp
+++ b/src/net/manaserv/inventoryhandler.cpp
@@ -65,6 +65,11 @@ EquipBackend::EquipBackend()
mVisibleSlots = 0;
}
+EquipBackend::~EquipBackend()
+{
+ clear();
+}
+
Item *EquipBackend::getEquipment(int slotIndex) const
{
Slots::const_iterator it = mSlots.find(slotIndex);
diff --git a/src/net/manaserv/inventoryhandler.h b/src/net/manaserv/inventoryhandler.h
index 1e05b49d..446105ee 100644
--- a/src/net/manaserv/inventoryhandler.h
+++ b/src/net/manaserv/inventoryhandler.h
@@ -38,6 +38,8 @@ class EquipBackend : public Equipment::Backend, public EventListener
public:
EquipBackend();
+ ~EquipBackend();
+
Item *getEquipment(int slotIndex) const;
std::string getSlotName(int slotIndex) const;
void clear();