summaryrefslogtreecommitdiff
path: root/sources/prefs/editors/VSSimulationEditor.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-22 15:35:52 +0000
committerPaul Buetow <paul@buetow.org>2008-05-22 15:35:52 +0000
commit68ca748737bbf5af57888872a9c072415e609d23 (patch)
treebc03b77a1e976e7672ea3b26c6ddd61df265776a /sources/prefs/editors/VSSimulationEditor.java
parentf7b023c5cff7dae854a015889bd217f3b84f6e07 (diff)
Simplemode/expertmode bugfix.
Diffstat (limited to 'sources/prefs/editors/VSSimulationEditor.java')
-rw-r--r--sources/prefs/editors/VSSimulationEditor.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/prefs/editors/VSSimulationEditor.java b/sources/prefs/editors/VSSimulationEditor.java
index f0106fd..86706cb 100644
--- a/sources/prefs/editors/VSSimulationEditor.java
+++ b/sources/prefs/editors/VSSimulationEditor.java
@@ -51,14 +51,16 @@ public class VSSimulationEditor extends VSBetterEditor {
if (actionCommand.equals(prefs.getString("lang.takeover"))) {
savePrefs();
if (expertModeChanged()) {
- simulation.fireExpertModeChanged();
+ if (simulation != null)
+ simulation.fireExpertModeChanged();
}
simulation.updateFromPrefs();
} else if (actionCommand.equals(prefs.getString("lang.ok"))) {
savePrefs();
if (expertModeChanged()) {
- simulation.fireExpertModeChanged();
+ if (simulation != null)
+ simulation.fireExpertModeChanged();
}
if (!dontStartNewSimulation)
simulatorFrame.addSimulation(new VSSimulation(prefsToEdit, simulatorFrame));