Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java26
1 files changed, 14 insertions, 12 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
index ecd58992c..62d723afe 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
@@ -2348,18 +2348,20 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
ILaunch launch = null;
for (int i= 0; i < launches.length; i++) {
launch = launches[i];
- try {
- if (launch instanceof IDisconnect) {
- IDisconnect disconnect = (IDisconnect)launch;
- if (disconnect.canDisconnect()) {
- disconnect.disconnect();
- }
- }
- if (launch.canTerminate()) {
- launch.terminate();
- }
- } catch (DebugException e) {
- DebugPlugin.log(e);
+ if(launch != null) {
+ try {
+ if (launch instanceof IDisconnect) {
+ IDisconnect disconnect = (IDisconnect)launch;
+ if (disconnect.canDisconnect()) {
+ disconnect.disconnect();
+ }
+ }
+ if (launch.canTerminate()) {
+ launch.terminate();
+ }
+ } catch (DebugException e) {
+ DebugPlugin.log(e);
+ }
}
}

Back to the top