diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 6e1985b..e6bb328 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -645,6 +645,8 @@ XMLNode::~XMLNode() const char* XMLNode::Value() const { + if ( this->ToDocument() ) + return ( const char* )0; return _value.GetStr(); }