Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
authorJohn Cortell2008-03-11 20:40:32 +0000
committerJohn Cortell2008-03-11 20:40:32 +0000
commit8c518b15d3b3b2b2bdad398da896e8b3495fc7c0 (patch)
tree5675ca489cd472e11d5a0326851f86e2f371c1fe /launch
parentf26e8c27d311020c1b199c44101b2b7279466bca (diff)
downloadorg.eclipse.cdt-8c518b15d3b3b2b2bdad398da896e8b3495fc7c0.tar.gz
org.eclipse.cdt-8c518b15d3b3b2b2bdad398da896e8b3495fc7c0.tar.xz
org.eclipse.cdt-8c518b15d3b3b2b2bdad398da896e8b3495fc7c0.zip
Avoid a NPE when we receive a TERMINATE event for an IProcess that was not created with a launch configuration (at a minimum, JDT creates such a thing in StandardVMType.java, a process called "Library Detection").
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
index 97011351429..66e803c82ff 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugEvent;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.swt.widgets.Shell;
@@ -210,7 +211,10 @@ public class LaunchUIPlugin extends AbstractUIPlugin implements IDebugEventSetLi
IProcess proc = (IProcess)o;
ICProject cproject = null;
try {
- cproject = AbstractCLaunchDelegate.getCProject(proc.getLaunch().getLaunchConfiguration());
+ ILaunchConfiguration launchConfig = proc.getLaunch().getLaunchConfiguration();
+ if (launchConfig != null) {
+ cproject = AbstractCLaunchDelegate.getCProject(launchConfig);
+ }
} catch (CoreException e) {
}
if (cproject != null) {

Back to the top