From 6fbbef1bb57e50f024d3c1486921b571ae9581b1 Mon Sep 17 00:00:00 2001 From: kruland2607 Date: Tue, 28 Oct 2014 20:34:47 -0500 Subject: [PATCH] Fixed NPE reported through a bug report. Somehow the listenerList was null when a change event was fired. Don't know how this really can happen, but protecting against the NPE isn't a bad idea. --- core/src/net/sf/openrocket/rocketcomponent/Configuration.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/net/sf/openrocket/rocketcomponent/Configuration.java b/core/src/net/sf/openrocket/rocketcomponent/Configuration.java index 4cad9533a..e426df1d7 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/Configuration.java +++ b/core/src/net/sf/openrocket/rocketcomponent/Configuration.java @@ -189,11 +189,10 @@ public class Configuration implements Cloneable, ChangeSource, ComponentChangeLi */ public void release() { rocket.removeComponentChangeListener(this); - listenerList = null; + listenerList = new ArrayList(); rocket = null; } - //////////////// Listeners //////////////// @Override