diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/StopActiveCommandHandler.java b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/StopActiveCommandHandler.java index 06276c71420..ab345d37f40 100644 --- a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/StopActiveCommandHandler.java +++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/StopActiveCommandHandler.java @@ -53,19 +53,21 @@ public class StopActiveCommandHandler extends AbstractHandler { return Status.OK_STATUS; } for (ILaunch launch : activeLaunches) { - ILaunchConfiguration launchConfig = launch.getLaunchConfiguration(); - if (activeConfig.equals(launchConfig)) { - launch.terminate(); - continue; - } - if (launchConfig instanceof ILaunchConfigurationWorkingCopy) { - // There are evil delegates that use a working - // copy for scratch storage - if (activeConfig - .equals(((ILaunchConfigurationWorkingCopy) launchConfig).getOriginal())) { + if (launch.canTerminate()) { + ILaunchConfiguration launchConfig = launch.getLaunchConfiguration(); + if (activeConfig.equals(launchConfig)) { launch.terminate(); continue; } + if (launchConfig instanceof ILaunchConfigurationWorkingCopy) { + // There are evil delegates that use a + // working copy for scratch storage + if (activeConfig + .equals(((ILaunchConfigurationWorkingCopy) launchConfig).getOriginal())) { + launch.terminate(); + continue; + } + } } } return Status.OK_STATUS;