aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-15 13:47:05 -0500
committermegamage <none@none>2009-08-15 13:47:05 -0500
commitbc7f37fe1cd29c4315b38d2c844e227e97e6b900 (patch)
tree8f79bd74a9858f217653b0abe9eedd2ca8b7a974
parenteb9d9ff071936aa0b3b8aead01025da77e1c6b2a (diff)
*Fix a crash caused by ItemExpire though the reason is unknown.
--HG-- branch : trunk
-rw-r--r--src/game/Item.cpp3
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;
}