소스 검색

Bypass asserts for `XMLDocument::Value()`

When the node is an XMLDocument, bypass calling the `_value.GetStr()` function, since we know we have to return `( const char* )0` inevitably.

This fixes #323
Sarat Addepalli 10 년 전
부모
커밋
9c3122b89b
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      tinyxml2.cpp

+ 2 - 0
tinyxml2.cpp

@@ -645,6 +645,8 @@ XMLNode::~XMLNode()
 
 const char* XMLNode::Value() const 
 {
+    if ( this->ToDocument() )
+        return ( const char* )0;
     return _value.GetStr();
 }