|
@@ -1262,7 +1262,7 @@ const char* XMLElement::GetText() const
|
|
|
|
|
|
|
|
void XMLElement::SetText( const char* inText )
|
|
void XMLElement::SetText( const char* inText )
|
|
|
{
|
|
{
|
|
|
- if ( FirstChild() )
|
|
|
|
|
|
|
+ if ( FirstChild() && FirstChild()->ToText() )
|
|
|
FirstChild()->SetValue( inText );
|
|
FirstChild()->SetValue( inText );
|
|
|
else {
|
|
else {
|
|
|
XMLText* theText = GetDocument()->NewText( inText );
|
|
XMLText* theText = GetDocument()->NewText( inText );
|