*Fix a bug that logging out while casting far sight causes crash.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-11-23 15:06:01 -06:00
parent 32b78f767c
commit 1d172c2a1c

View File

@@ -190,7 +190,7 @@ Deliverer::Visit(DynamicObjectMapType &m)
{
// Send packet back to the caster if the caster has vision of dynamic object
Player* caster = (Player*)iter->getSource()->GetCaster();
if (caster->GetUInt64Value(PLAYER_FARSIGHT) == iter->getSource()->GetGUID() &&
if (caster && caster->GetUInt64Value(PLAYER_FARSIGHT) == iter->getSource()->GetGUID() &&
(!i_dist || iter->getSource()->GetDistance(&i_source) <= i_dist))
SendPacket(caster);
}