aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
}