]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xmlres.cpp
compilation warning fix
[wxWidgets.git] / src / xrc / xmlres.cpp
index c5f7a8c8ed6fb771fcef1ca12d902ad66349c401..8064dd94703f37f23aecebeb2381073dc48e58a4 100644 (file)
@@ -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();
     }
 }
 
@@ -805,8 +808,10 @@ wxFont wxXmlResourceHandler::GetFont(const wxString& param)
     wxString encoding = GetParamValue(wxT("encoding"));
     wxFontMapper mapper;
     wxFontEncoding enc = wxFONTENCODING_DEFAULT;
-    if (!encoding.IsEmpty()) enc = mapper.CharsetToEncoding(encoding);
-    if (enc == wxFONTENCODING_SYSTEM) enc = wxFONTENCODING_SYSTEM;
+    if (!encoding.IsEmpty())
+        enc = mapper.CharsetToEncoding(encoding);
+    if (enc == wxFONTENCODING_SYSTEM)
+        enc = wxFONTENCODING_DEFAULT;
 
     wxString faces = GetParamValue(wxT("face"));
     wxString facename = wxEmptyString;