bugfix: gui-dependency caused nullpointer exception in test mode
This commit is contained in:
parent
5788560946
commit
2f757527d4
|
@ -264,15 +264,19 @@ public class ScriptRunner extends VisPlugin {
|
|||
if (source == null) {
|
||||
updateScript("");
|
||||
|
||||
actionLinkFile.setMenuText("Link script to disk file");
|
||||
actionLinkFile.putValue("JavascriptSource", null);
|
||||
if (actionLinkFile != null) {
|
||||
actionLinkFile.setMenuText("Link script to disk file");
|
||||
actionLinkFile.putValue("JavascriptSource", null);
|
||||
}
|
||||
|
||||
codeEditor.setEditable(true);
|
||||
} else {
|
||||
updateScript(linkedFile);
|
||||
|
||||
actionLinkFile.setMenuText("Unlink script: " + source.getName());
|
||||
actionLinkFile.putValue("JavascriptSource", source);
|
||||
if (actionLinkFile != null) {
|
||||
actionLinkFile.setMenuText("Unlink script: " + source.getName());
|
||||
actionLinkFile.putValue("JavascriptSource", source);
|
||||
}
|
||||
|
||||
codeEditor.setEditable(false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue