From 28707df0c7939c8566a1d31034bc784b8e5955ef Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Fri, 13 Aug 2010 09:37:02 +0000 Subject: [PATCH] Bug 316289 - NPE in ProblemsLabelDecorator --- .../ui/viewsupport/ProblemsLabelDecorator.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ProblemsLabelDecorator.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ProblemsLabelDecorator.java index 55543b84273..17232c410cc 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ProblemsLabelDecorator.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ProblemsLabelDecorator.java @@ -384,10 +384,12 @@ public class ProblemsLabelDecorator implements ILabelDecorator, ILightweightLabe ICProjectDescription prjDescription = CoreModel.getDefault().getProjectDescription(rc.getProject(), false); if (prjDescription != null) { ICConfigurationDescription cfgDescription = prjDescription.getDefaultSettingConfiguration(); - IPath path = rc.getProjectRelativePath(); - ICResourceDescription rcDescription = cfgDescription.getResourceDescription(path, true); - if (rcDescription != null) - result |= TICK_CONFIGURATION; + if (cfgDescription != null) { + IPath path = rc.getProjectRelativePath(); + ICResourceDescription rcDescription = cfgDescription.getResourceDescription(path, true); + if (rcDescription != null) + result |= TICK_CONFIGURATION; + } } return result; }