mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 334940: NPE in GdbPlugin.shutdownActiveLaunches() during simple junit tests
This commit is contained in:
parent
ed248b232f
commit
c31bfa24ec
1 changed files with 8 additions and 1 deletions
|
@ -91,7 +91,14 @@ public class GdbPlugin extends Plugin {
|
||||||
* is shut down will result in exceptions.
|
* is shut down will result in exceptions.
|
||||||
*/
|
*/
|
||||||
private void shutdownActiveLaunches() {
|
private void shutdownActiveLaunches() {
|
||||||
for (ILaunch launch : DebugPlugin.getDefault().getLaunchManager().getLaunches()) {
|
|
||||||
|
DebugPlugin debugPlugin = DebugPlugin.getDefault();
|
||||||
|
if (debugPlugin == null) {
|
||||||
|
// Simple junit tests don't cause the platform debug plugins to load
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (ILaunch launch : debugPlugin.getLaunchManager().getLaunches()) {
|
||||||
if (launch instanceof GdbLaunch && ((GdbLaunch)launch).getSession().isActive()) {
|
if (launch instanceof GdbLaunch && ((GdbLaunch)launch).getSession().isActive()) {
|
||||||
final GdbLaunch gdbLaunch = (GdbLaunch)launch;
|
final GdbLaunch gdbLaunch = (GdbLaunch)launch;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue