aboutsummaryrefslogtreecommitdiff
path: root/src/game/Item.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2009-08-15 23:32:53 +0200
committerMachiavelli <none@none>2009-08-15 23:32:53 +0200
commit340a206f05b93b16aa66a57d567635ba47caa553 (patch)
tree30b97a282eeda06e746230c19536fdfabfeb7144 /src/game/Item.cpp
parent00d53460c8dc34fbc0ea038973943a7ea666cd3d (diff)
parent8387e8a4fd0eb5fc8aa17d3fbd4f6c4fee72982f (diff)
*Merge
--HG-- branch : trunk
Diffstat (limited to 'src/game/Item.cpp')
-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;
}