From 97ecc97fd4324e3c38f865a50caa4bf4c3fe3311 Mon Sep 17 00:00:00 2001 From: Andreas Troelsen Date: Mon, 28 Jan 2013 22:51:52 +0100 Subject: [PATCH] Fix possible NPEs. --- src/com/garbagemule/MobArena/ArenaMasterImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/garbagemule/MobArena/ArenaMasterImpl.java b/src/com/garbagemule/MobArena/ArenaMasterImpl.java index 4dc5c3c7f..c51fc93 100644 --- a/src/com/garbagemule/MobArena/ArenaMasterImpl.java +++ b/src/com/garbagemule/MobArena/ArenaMasterImpl.java @@ -86,6 +86,9 @@ public class ArenaMasterImpl implements ArenaMaster } public Arena getSelectedArena() { + if (selectedArena == null && !arenas.isEmpty()) { + selectedArena = arenas.get(0); + } return selectedArena; }