X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3fb676f87d610b32ffa4d322aca1723fc93835bb..42f30fa288e18beb7dedc5648c009d476c43e9e1:/src/xrc/xml.cpp diff --git a/src/xrc/xml.cpp b/src/xrc/xml.cpp index cf48cf0038..bc3bc6af58 100644 --- a/src/xrc/xml.cpp +++ b/src/xrc/xml.cpp @@ -256,12 +256,14 @@ void wxXmlNode::AddProperty(wxXmlProperty *prop) bool wxXmlNode::DeleteProperty(const wxString& name) { + wxXmlProperty *prop; + if (m_properties == NULL) return FALSE; else if (m_properties->GetName() == name) { - wxXmlProperty *prop = m_properties; + prop = m_properties; m_properties = prop->GetNext(); prop->SetNext(NULL); delete prop; @@ -275,7 +277,7 @@ bool wxXmlNode::DeleteProperty(const wxString& name) { if (p->GetNext()->GetName() == name) { - wxXmlProperty *prop = p->GetNext(); + prop = p->GetNext(); p->SetNext(prop->GetNext()); prop->SetNext(NULL); delete prop;