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 -------------- {