Fix NPE
This commit is contained in:
parent
97d34e4415
commit
34586a83f6
@ -23,7 +23,7 @@ public class CNPC {
|
|||||||
for (NPC npc : npcs) {
|
for (NPC npc : npcs) {
|
||||||
Character c = npc.getInteractingCharacter();
|
Character c = npc.getInteractingCharacter();
|
||||||
|
|
||||||
if (c != null && c.getName().equals(Players.localPlayer().getName())) {
|
if (c != null && c.getName() != null && c.getName().equals(Players.localPlayer().getName())) {
|
||||||
return npc;
|
return npc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user