]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xml/xml.cpp
updates from Adrián González Alba
[wxWidgets.git] / src / xml / xml.cpp
index 25ffc91ea9beb868186249494822ebb79cb81eaa..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);
 }