Add check to prevent creation of element wxXmlNodes with content data.
Just like in the DOM, only text, ctype etc. nodes have textual content, elements don't. See #13297. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7973979598
commit
527d2d2d47
@ -58,6 +58,8 @@ wxXmlNode::wxXmlNode(wxXmlNode *parent,wxXmlNodeType type,
|
||||
m_lineNo(lineNo),
|
||||
m_noConversion(false)
|
||||
{
|
||||
wxASSERT_MSG ( type != wxXML_ELEMENT_NODE || content.empty(), "element nodes can't have content" );
|
||||
|
||||
if (m_parent)
|
||||
{
|
||||
if (m_parent->m_children)
|
||||
@ -77,7 +79,9 @@ wxXmlNode::wxXmlNode(wxXmlNodeType type, const wxString& name,
|
||||
m_attrs(NULL), m_parent(NULL),
|
||||
m_children(NULL), m_next(NULL),
|
||||
m_lineNo(lineNo), m_noConversion(false)
|
||||
{}
|
||||
{
|
||||
wxASSERT_MSG ( type != wxXML_ELEMENT_NODE || content.empty(), "element nodes can't have content" );
|
||||
}
|
||||
|
||||
wxXmlNode::wxXmlNode(const wxXmlNode& node)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user