Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorNathan Ridge2017-12-05 05:22:18 +0000
committerNathan Ridge2017-12-12 03:38:42 +0000
commite2c5592d9de0cd0d033a6a46defb8ef5910f31c5 (patch)
treea3de1bac69fcfa04cbfab57b1d3a80e0cda8a413 /core
parentf8b30717ce9b4da78f017f53373ceacf32797111 (diff)
downloadorg.eclipse.cdt-e2c5592d9de0cd0d033a6a46defb8ef5910f31c5.tar.gz
org.eclipse.cdt-e2c5592d9de0cd0d033a6a46defb8ef5910f31c5.tar.xz
org.eclipse.cdt-e2c5592d9de0cd0d033a6a46defb8ef5910f31c5.zip
Bug 528124 - NPE in CCOdeFormatter.findOverlappingPreprocessorStatement()
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CCodeFormatter.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CCodeFormatter.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CCodeFormatter.java
index 30d936d5669..b385455878e 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CCodeFormatter.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CCodeFormatter.java
@@ -165,6 +165,9 @@ public class CCodeFormatter extends CodeFormatter {
} catch (CoreException e) {
throw new AbortFormatting(e);
}
+ if (ast == null) {
+ throw new AbortFormatting("AST is null"); //$NON-NLS-1$
+ }
formatRegions(source, regions, edits, ast);
} finally {
index.releaseReadLock();

Back to the top