diff options
author | spp <none@none> | 2009-12-06 16:49:17 +0100 |
---|---|---|
committer | spp <none@none> | 2009-12-06 16:49:17 +0100 |
commit | 98e9c4211369b9263a60d7c7e7f51173c53456ae (patch) | |
tree | 5514326fef77bd7b59926cd72b3e5f6ede1efb20 /src/game/Bag.cpp | |
parent | 83185d16a01560c8bf1084f7980242ac2e9bf4b8 (diff) |
Fix a crash related to bags (infinite recursive call). closes #581
--HG--
branch : trunk
Diffstat (limited to 'src/game/Bag.cpp')
-rw-r--r-- | src/game/Bag.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Bag.cpp b/src/game/Bag.cpp index 72d71c5e8bc..ec321826eae 100644 --- a/src/game/Bag.cpp +++ b/src/game/Bag.cpp @@ -157,11 +157,11 @@ void Bag::RemoveItem( uint8 slot, bool /*update*/ ) SetUInt64Value( CONTAINER_FIELD_SLOT_1 + (slot * 2), 0 ); } -void Bag::StoreItem( uint8 slot, Item *pItem, bool /*update*/ ) +void Bag::StoreItem(uint8 slot, Item *pItem, bool /*update*/) { assert(slot < MAX_BAG_SIZE); - if( pItem ) + if (pItem && pItem->GetGUID() != this->GetGUID()) { m_bagslot[slot] = pItem; SetUInt64Value(CONTAINER_FIELD_SLOT_1 + (slot * 2), pItem->GetGUID()); |