[ 1601396 ] Fix copy of empty wxXmlDocuments

and minor doc update.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-11-26 18:41:43 +00:00
parent 68fd4f2c14
commit e8da6b7cef
2 changed files with 24 additions and 13 deletions

View File

@@ -386,7 +386,11 @@ void wxXmlDocument::DoCopy(const wxXmlDocument& doc)
m_encoding = doc.m_encoding;
#endif
m_fileEncoding = doc.m_fileEncoding;
m_root = new wxXmlNode(*doc.m_root);
if (doc.m_root)
m_root = new wxXmlNode(*doc.m_root);
else
m_root = NULL;
}
bool wxXmlDocument::Load(const wxString& filename, const wxString& encoding, int flags)