From 148cc1a0a57c8ab906fc8dbf987a4096f1d09e76 Mon Sep 17 00:00:00 2001 From: Ant Mitchell Date: Tue, 24 Mar 2015 15:12:35 +0000 Subject: [PATCH] Issue 299 - test for code changes --- xmltest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xmltest.cpp b/xmltest.cpp index 243628c..06ac9fc 100644 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -1425,6 +1425,14 @@ int main( int argc, const char ** argv ) XMLPrinter printer; doc.Print( &printer ); } + { + // Issue 299. Can print elements that are not linked in. + // Will crash if issue not fixed. + XMLDocument doc; + XMLElement* newElement = doc.NewElement( "printme" ); + XMLPrinter printer; + newElement->Accept( &printer ); + } // ----------- Performance tracking -------------- {