Fixed probable processQuestEvent NPE.

Contributed by Sero.
This commit is contained in:
MobiusDevelopment
2021-04-20 18:17:49 +00:00
parent de143b8c2a
commit cdcad605af
19 changed files with 19 additions and 19 deletions

View File

@@ -1457,7 +1457,7 @@ public class PlayerInstance extends Playable
else if (_questNpcObject > 0)
{
final WorldObject object = World.getInstance().findObject(getLastQuestNpcObject());
if (object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
if ((object != null) && object.isNpc() && isInsideRadius2D(object, Npc.INTERACTION_DISTANCE))
{
final Npc npc = (Npc) object;
quest.notifyEvent(event, npc, this);