commit | 869bb599c14199905d35819796fb686b0b36e958 | [log] [tgz] |
---|---|---|
author | Uli Kusterer <ulivc@zathras.de> | Tue Jan 21 01:36:16 2014 +0100 |
committer | Uli Kusterer <ulivc@zathras.de> | Tue Jan 21 01:36:16 2014 +0100 |
tree | 2f31175b62f4cf0177cbea96063c54291378ef1a | |
parent | 85fff5e50a6b6c1b9cb668fb795ee99ce7590193 [diff] [blame] |
Make SetText() behave like the docs say.
diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 95075a5..0338beb 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp
@@ -1262,7 +1262,7 @@ void XMLElement::SetText( const char* inText ) { - if ( FirstChild() ) + if ( FirstChild() && FirstChild()->ToText() ) FirstChild()->SetValue( inText ); else { XMLText* theText = GetDocument()->NewText( inText );