mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Fix for NPE
This commit is contained in:
parent
252f33f0cd
commit
4876461e51
1 changed files with 3 additions and 1 deletions
|
@ -78,7 +78,9 @@ public class ASTWriter {
|
||||||
*/
|
*/
|
||||||
public String write(IASTNode rootNode, String fileScope, NodeCommentMap commentMap) throws ProblemRuntimeException {
|
public String write(IASTNode rootNode, String fileScope, NodeCommentMap commentMap) throws ProblemRuntimeException {
|
||||||
transformationVisitor = new ChangeGeneratorWriterVisitor(modificationStore, givenIndentation, fileScope, commentMap);
|
transformationVisitor = new ChangeGeneratorWriterVisitor(modificationStore, givenIndentation, fileScope, commentMap);
|
||||||
rootNode.accept(transformationVisitor);
|
if(rootNode != null){
|
||||||
|
rootNode.accept(transformationVisitor);
|
||||||
|
}
|
||||||
String str = transformationVisitor.toString();
|
String str = transformationVisitor.toString();
|
||||||
transformationVisitor.cleanCache();
|
transformationVisitor.cleanCache();
|
||||||
return str;
|
return str;
|
||||||
|
|
Loading…
Add table
Reference in a new issue