mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
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").
This commit is contained in:
parent
f26e8c27d3
commit
8c518b15d3
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue