1
0
Fork 0
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:
Emanuel Graf 2009-11-24 07:16:01 +00:00
parent 252f33f0cd
commit 4876461e51

View file

@ -78,7 +78,9 @@ public class ASTWriter {
*/
public String write(IASTNode rootNode, String fileScope, NodeCommentMap commentMap) throws ProblemRuntimeException {
transformationVisitor = new ChangeGeneratorWriterVisitor(modificationStore, givenIndentation, fileScope, commentMap);
rootNode.accept(transformationVisitor);
if(rootNode != null){
rootNode.accept(transformationVisitor);
}
String str = transformationVisitor.toString();
transformationVisitor.cleanCache();
return str;