From 25c1ba23078152a828685f1543d9bd852c08f73b Mon Sep 17 00:00:00 2001 From: kruland2607 Date: Fri, 8 Nov 2013 20:10:44 -0600 Subject: [PATCH] Protect against NPE when simulations are not properly set up. --- core/src/net/sf/openrocket/document/OpenRocketDocument.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/net/sf/openrocket/document/OpenRocketDocument.java b/core/src/net/sf/openrocket/document/OpenRocketDocument.java index fdf88c742..c479005b9 100644 --- a/core/src/net/sf/openrocket/document/OpenRocketDocument.java +++ b/core/src/net/sf/openrocket/document/OpenRocketDocument.java @@ -287,7 +287,7 @@ public class OpenRocketDocument implements ComponentChangeListener { } for (Simulation s : getSimulations()) { // Assumes modifiable collection - which it is - if (s.getConfiguration().getFlightConfigurationID().equals(configId)) { + if (configId.equals(s.getConfiguration().getFlightConfigurationID())) { removeSimulation(s); } }