From 354ed9ede0310533433c9d374d103600ca0df248 Mon Sep 17 00:00:00 2001 From: bm01 Date: Fri, 4 May 2012 11:04:05 +0200 Subject: [PATCH] Fixed NPE on /party --- Changelog.txt | 1 + src/main/java/com/gmail/nossr50/party/Party.java | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 14b2aed3f..42b0fb60d 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -19,6 +19,7 @@ Version 1.3.07 + Added config options for enabling/disabling specific double drops + Added automatic zip backup of flatfile database & config files + Added config options to enable/disable specific skills for PVP & PVE + = Fixed rare NPE on /party command = Fixed Arrow Retrieval dropping only one arrow = Fixed /p and /a incompatibilities with bChatManager = Fixed Iron Grip working reversely diff --git a/src/main/java/com/gmail/nossr50/party/Party.java b/src/main/java/com/gmail/nossr50/party/Party.java index 9d9a887bb..7afd24280 100644 --- a/src/main/java/com/gmail/nossr50/party/Party.java +++ b/src/main/java/com/gmail/nossr50/party/Party.java @@ -152,9 +152,10 @@ public class Party { if (player != null) { for (String name : profiles.keySet()) { - Player p = profiles.get(name).getPlayer(); - if (inSameParty(p, player)) { - players.add(p); + Player otherPlayer = profiles.get(name).getPlayer(); + + if (otherPlayer != null && inSameParty(otherPlayer, player)) { + players.add(otherPlayer); } } }