diff --git a/contrib/src/xrc/xmlres.cpp b/contrib/src/xrc/xmlres.cpp index c5f7a8c8ed..ef1e2f2761 100644 --- a/contrib/src/xrc/xmlres.cpp +++ b/contrib/src/xrc/xmlres.cpp @@ -245,14 +245,17 @@ static void ProcessPlatformProperty(wxXmlNode *node) } if (isok) + { ProcessPlatformProperty(c); + c = c->GetNext(); + } else { node->RemoveChild(c); + wxXmlNode *c2 = c->GetNext(); delete c; + c = c2; } - - c = c->GetNext(); } } diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index c5f7a8c8ed..ef1e2f2761 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -245,14 +245,17 @@ static void ProcessPlatformProperty(wxXmlNode *node) } if (isok) + { ProcessPlatformProperty(c); + c = c->GetNext(); + } else { node->RemoveChild(c); + wxXmlNode *c2 = c->GetNext(); delete c; + c = c2; } - - c = c->GetNext(); } }