diff options
author | John Cortell | 2008-03-11 20:40:32 +0000 |
---|---|---|
committer | John Cortell | 2008-03-11 20:40:32 +0000 |
commit | 8c518b15d3b3b2b2bdad398da896e8b3495fc7c0 (patch) | |
tree | 5675ca489cd472e11d5a0326851f86e2f371c1fe /launch | |
parent | f26e8c27d311020c1b199c44101b2b7279466bca (diff) | |
download | org.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.java | 6 |
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) { |