diff options
author | megamage <none@none> | 2009-08-15 13:47:05 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-15 13:47:05 -0500 |
commit | bc7f37fe1cd29c4315b38d2c844e227e97e6b900 (patch) | |
tree | 8f79bd74a9858f217653b0abe9eedd2ca8b7a974 | |
parent | eb9d9ff071936aa0b3b8aead01025da77e1c6b2a (diff) |
*Fix a crash caused by ItemExpire though the reason is unknown.
--HG--
branch : trunk
-rw-r--r-- | src/game/Item.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 484fa766da0..dac3ca8b0c8 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -286,7 +286,8 @@ void Item::UpdateDuration(Player* owner, uint32 diff) if (GetUInt32Value(ITEM_FIELD_DURATION)<=diff) { owner->DestroyItem(GetBagSlot(), GetSlot(), true); - Script->ItemExpire(owner, GetProto()); + if(const ItemPrototype *proto = GetProto()) + Script->ItemExpire(owner, proto); return; } |