1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Bug 528124 - NPE in CCOdeFormatter.findOverlappingPreprocessorStatement()

Change-Id: I4669d4938551506d7a06624b4318253cc4ecc643
This commit is contained in:
Nathan Ridge 2017-12-05 00:22:18 -05:00
parent 2ac7089288
commit 58e2f34bfc

View file

@ -165,6 +165,9 @@ public class CCodeFormatter extends CodeFormatter {
} catch (CoreException e) { } catch (CoreException e) {
throw new AbortFormatting(e); throw new AbortFormatting(e);
} }
if (ast == null) {
throw new AbortFormatting("AST is null"); //$NON-NLS-1$
}
formatRegions(source, regions, edits, ast); formatRegions(source, regions, edits, ast);
} finally { } finally {
index.releaseReadLock(); index.releaseReadLock();