From bc7f37fe1cd29c4315b38d2c844e227e97e6b900 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 15 Aug 2009 13:47:05 -0500 Subject: *Fix a crash caused by ItemExpire though the reason is unknown. --HG-- branch : trunk --- src/game/Item.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3