From 3f0d330d6e9ace137105a7f861cff996e90ce22b Mon Sep 17 00:00:00 2001 From: Brettflan Date: Sat, 11 Jun 2011 17:01:06 -0500 Subject: [PATCH] fix for /f disband causing NPE if you provided a bad (nonexistent) faction tag --- src/org/mcteam/factions/commands/FCommandDisband.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/mcteam/factions/commands/FCommandDisband.java b/src/org/mcteam/factions/commands/FCommandDisband.java index 1da138b3..632a740e 100644 --- a/src/org/mcteam/factions/commands/FCommandDisband.java +++ b/src/org/mcteam/factions/commands/FCommandDisband.java @@ -23,7 +23,7 @@ public class FCommandDisband extends FBaseCommand { if( parameters.size() > 0) { Faction faction = Faction.findByTag(parameters.get(0)); - if( faction.getId() > 0 ) { + if( faction != null && faction.getId() > 0 ) { me.sendMessage("Faction " + faction.getTag() + " got disbanded"); Faction.delete( faction.getId() ); } else {