]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xml/xml.cpp
shouldn't update cursor for hidden windows
[wxWidgets.git] / src / xml / xml.cpp
index 4c6dcdd7711fbcfe8d04e0db5a3311b8e9c521b7..990d6aa81fb2e44650c88fd3c1824a7ea48d2223 100644 (file)
@@ -348,12 +348,16 @@ void wxXmlDocument::DoCopy(const wxXmlDocument& doc)
 bool wxXmlDocument::Load(const wxString& filename, const wxString& encoding)
 {
     wxFileInputStream stream(filename);
+    if (!stream.Ok())
+        return false;
     return Load(stream, encoding);
 }
 
 bool wxXmlDocument::Save(const wxString& filename) const
 {
     wxFileOutputStream stream(filename);
+    if (!stream.Ok())
+        return false;
     return Save(stream);
 }
 
@@ -385,7 +389,7 @@ static wxString CharToString(wxMBConv *conv,
         const wxWCharBuffer wbuf(
             wxConvUTF8.cMB2WC(s, len == wxSTRING_MAXLEN ? wxNO_LEN : len, NULL));
 
-        return wxString(wbuf, conv);
+        return wxString(wbuf, *conv);
     }
     else // already in UTF-8, no conversion needed
     {