X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68fd4f2c14f5bb081627fb8e4efc7ad2e0ca000d..e8da6b7cef55cc0fa4a02938919fc790836d380d:/src/xml/xml.cpp diff --git a/src/xml/xml.cpp b/src/xml/xml.cpp index 4c94c15431..23c01e477e 100644 --- a/src/xml/xml.cpp +++ b/src/xml/xml.cpp @@ -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)