diff --git a/src/dscanner/astprinter.d b/src/dscanner/astprinter.d index 4aab493..1b2cbbf 100644 --- a/src/dscanner/astprinter.d +++ b/src/dscanner/astprinter.d @@ -598,7 +598,8 @@ class XMLPrinter : ASTVisitor override void visit(const LabeledStatement labeledStatement) { output.writeln(""); - visit(labeledStatement.declarationOrStatement); + if (labeledStatement.declarationOrStatement !is null) + visit(labeledStatement.declarationOrStatement); output.writeln(""); }