diff --git a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/ScriptEngineManagerImpl.java b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/ScriptEngineManagerImpl.java index 5194771118..ac335cec89 100644 --- a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/ScriptEngineManagerImpl.java +++ b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/ScriptEngineManagerImpl.java @@ -198,7 +198,7 @@ public class ScriptEngineManagerImpl implements ScriptEngineManager { @Override public void removeEngine(String engineIdentifier) { - ScriptEngineContainer container = loadedScriptEngineInstances.get(engineIdentifier); + ScriptEngineContainer container = loadedScriptEngineInstances.remove(engineIdentifier); if (container != null) { ScriptEngine scriptEngine = container.getScriptEngine(); if (scriptEngine instanceof Invocable) {