From dfb713b5c863a2e0b0863a649186a34f5ed5d480 Mon Sep 17 00:00:00 2001 From: Karsten Thoms Date: Fri, 16 Feb 2018 12:12:06 +0100 Subject: [PATCH] Bug 351718 - Avoid NPE when no default setting available Change-Id: I2950bdcc30672fe3fa8e80b49f9bdeed17db5cdf Signed-off-by: Karsten Thoms --- .../cdt/internal/ui/viewsupport/ExcludedFileDecorator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ExcludedFileDecorator.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ExcludedFileDecorator.java index b4427665d50..250f8a05752 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ExcludedFileDecorator.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ExcludedFileDecorator.java @@ -43,7 +43,7 @@ public class ExcludedFileDecorator implements ILightweightLabelDecorator { if (desc == null) return; ICConfigurationDescription conf = desc.getDefaultSettingConfiguration(); - ICSourceEntry[] entries = conf.getSourceEntries(); + ICSourceEntry[] entries = conf != null ? conf.getSourceEntries() : new ICSourceEntry[0]; boolean isUnderSourceRoot = false; IPath fullPath = resource.getFullPath(); for (ICSourceEntry icSourceEntry : entries) {