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:
parent
10e74dda52
commit
983005e3c4
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue