X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..6dd18972d509fce16afa05eba194ca21db2c48f3:/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