1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00

GDB Automatic remote launch, NP Exception check

Null pointer checks were missing in GdbLaunch e.g. to cover the case
when the instance is not fully initialized e.g. invalid gdbserver path.

Change-Id: Ie5b593417aa831cb5b35b19f31d2b0a03b1fdc86
Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
This commit is contained in:
Alvaro Sanchez-Leon 2016-03-21 14:03:39 -04:00 committed by Marc Khouzam
parent 8f25e4b5b2
commit 16b3fbcfd6

View file

@ -364,8 +364,11 @@ public class GdbLaunch extends DsfLaunch implements ITerminate, IDisconnect, ITr
new IStatus[] { getStatus() }, "Session shutdown failed", null)); //$NON-NLS-1$
}
// Last order of business, shutdown the dispatch queue.
if (fTracker != null) {
fTracker.dispose();
fTracker = null;
}
DsfSession.endSession(fSession);
// 'fireTerminate()' removes this launch from the list
@ -390,12 +393,16 @@ public class GdbLaunch extends DsfLaunch implements ITerminate, IDisconnect, ITr
final Step[] steps = new Step[] { new Step() {
@Override
public void execute(RequestMonitor rm) {
if (fTracker != null) {
IGDBControl control = fTracker.getService(IGDBControl.class);
if (control == null) {
rm.done();
if (control != null) {
control.terminate(rm);
return;
}
control.terminate(rm);
}
rm.done();
return;
}
},