]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xml.cpp
added an explicit accessor to query the default key value
[wxWidgets.git] / src / xrc / xml.cpp
index cf48cf0038cb031471130a074a1d24f61c2ff6a0..bc3bc6af58c389cd41e217954ad1ef797e569444 100644 (file)
@@ -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;