*Fix a crash caused by ItemExpire though the reason is unknown.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-15 13:47:05 -05:00
parent eb9d9ff071
commit bc7f37fe1c

View File

@@ -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;
}