Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorNathan Ridge2018-01-30 05:50:23 +0000
committerNathan Ridge2018-02-06 03:51:32 +0000
commit345f37874c118a78b3df00cf4d9a18f9875b56ab (patch)
treeac47d9a687f77cfabf2728cadca61a819e2613fb /codan
parent5b29b5b5d8714a82b9d9667c7e61d44a554bec76 (diff)
downloadorg.eclipse.cdt-345f37874c118a78b3df00cf4d9a18f9875b56ab.tar.gz
org.eclipse.cdt-345f37874c118a78b3df00cf4d9a18f9875b56ab.tar.xz
org.eclipse.cdt-345f37874c118a78b3df00cf4d9a18f9875b56ab.zip
Bug 530481 - NPE in QuickFixSuppressProblem.prepareFor()
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixSuppressProblem.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixSuppressProblem.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixSuppressProblem.java
index 8045c92638..f6f35e5104 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixSuppressProblem.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixSuppressProblem.java
@@ -64,7 +64,10 @@ public class QuickFixSuppressProblem extends AbstractAstRewriteQuickFix implemen
@Override
public void prepareFor(IMarker marker) {
- problemName = getProblem(marker).getName();
+ IProblem problem = getProblem(marker);
+ if (problem != null) {
+ problemName = problem.getName();
+ }
}
@Override

Back to the top