X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..eedc82f4e96c7f8f0b24addbfd6b4429c9587631:/src/common/sckfile.cpp?ds=sidebyside

diff --git a/src/common/sckfile.cpp b/src/common/sckfile.cpp
index 5dbc6a0c12..6118f10c01 100644
--- a/src/common/sckfile.cpp
+++ b/src/common/sckfile.cpp
@@ -43,7 +43,13 @@ wxFileProto::~wxFileProto()
 
 wxInputStream *wxFileProto::GetInputStream(const wxString& path)
 {
-  return new wxFileInputStream(path);
+  wxFileInputStream* retval = new wxFileInputStream(wxURL::ConvertFromURI(path));
+  if (retval->Ok()) {
+    return retval;
+  } else {
+    delete retval;
+    return 0;
+  }
 }
 
 #endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE