1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-19 14:15:50 +02:00

Avoid setting active target to ILaunchTarget.NULL_TARGET

Sometimes the active target would be set to a null "---" target when
switching between launch descriptors even though a valid non-null launch
target could be selected.  Added a check to syncActiveTarget() in order
to prevent this scenario from happening.

Change-Id: Ife75701e8753123e6b1c5202b7bda339c6bfafd4
Signed-off-by: Matthew Bastien <bastien.matthew@gmail.com>
This commit is contained in:
Matthew Bastien 2017-04-04 12:41:10 -04:00
parent fd7e8fcde0
commit de43afb5b8

View file

@ -525,7 +525,8 @@ public class LaunchBarManager implements ILaunchBarManager, ILaunchTargetListene
}
} else {
// current active target, check if it is supported
if (activeLaunchTarget != null && supportsTarget(activeLaunchDesc, activeLaunchTarget)) {
if (activeLaunchTarget != null && activeLaunchTarget != ILaunchTarget.NULL_TARGET
&& supportsTarget(activeLaunchDesc, activeLaunchTarget)) {
setActiveLaunchTarget(activeLaunchTarget);
return;
}