Core/Spells: Fixed crash introduced in last commit
This commit is contained in:
@@ -22973,7 +22973,10 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
|
|||||||
WorldObject* Player::GetViewpoint() const
|
WorldObject* Player::GetViewpoint() const
|
||||||
{
|
{
|
||||||
if (uint64 guid = GetUInt64Value(PLAYER_FARSIGHT))
|
if (uint64 guid = GetUInt64Value(PLAYER_FARSIGHT))
|
||||||
return (WorldObject*)ObjectAccessor::GetObjectByTypeMask(*this, guid, TYPEMASK_SEER);
|
{
|
||||||
|
WorldObject* viewpoint = (WorldObject*) ObjectAccessor::GetObjectByTypeMask(*this, guid, TYPEMASK_SEER);
|
||||||
|
return viewpoint ? viewpoint : (WorldObject*) this; // always expected not NULL
|
||||||
|
}
|
||||||
return (WorldObject*) this;
|
return (WorldObject*) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user