1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 01:15:29 +02:00

Bug 566712: Fix NPE on last item in list delete

Change-Id: I9fe2f5b51be7389c8e09c4461a878f982d765695
This commit is contained in:
Jonah Graham 2020-09-06 21:43:04 -04:00
parent 10e74dda52
commit 983005e3c4

View file

@ -145,6 +145,12 @@ public class ContainerCommandLauncherFactory implements ICommandLauncherFactory,
public void registerLanguageSettingEntries(IProject project, List<? extends ICLanguageSettingEntry> langEntries) {
@SuppressWarnings("unchecked")
List<ICLanguageSettingEntry> entries = (List<ICLanguageSettingEntry>) langEntries;
if (langEntries == null) {
// langEntries can be null when the last item is removed from a list,
// see org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsEntriesTab.saveEntries(ILanguageSettingsProvider, List<ICLanguageSettingEntry>)
// for an example that passes null to mean "use parent entries instead".
return;
}
ICConfigurationDescription cfgd = CoreModel.getDefault().getProjectDescription(project)
.getActiveConfiguration();
IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgd);