Applied patch [ 817665 ] make file: URL return 0 on GetInputStream() for missing file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -43,7 +43,13 @@ wxFileProto::~wxFileProto()
|
|||||||
|
|
||||||
wxInputStream *wxFileProto::GetInputStream(const wxString& path)
|
wxInputStream *wxFileProto::GetInputStream(const wxString& path)
|
||||||
{
|
{
|
||||||
return new wxFileInputStream(wxURL::ConvertFromURI(path));
|
wxFileInputStream* retval = new wxFileInputStream(wxURL::ConvertFromURI(path));
|
||||||
|
if (retval->Ok()) {
|
||||||
|
return retval;
|
||||||
|
} else {
|
||||||
|
delete retval;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE
|
#endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE
|
||||||
|
Reference in New Issue
Block a user