Now possible to compile with wxURL disabled

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2004-10-27 17:33:32 +00:00
parent cf49c9551b
commit 34e0d9f874
4 changed files with 19 additions and 2 deletions

View File

@@ -43,13 +43,17 @@ wxFileProto::~wxFileProto()
wxInputStream *wxFileProto::GetInputStream(const wxString& path)
{
wxFileInputStream* retval = new wxFileInputStream(wxURL::ConvertFromURI(path));
#if !wxUSE_URL
return NULL;
#else
wxFileInputStream* retval = new wxFileInputStream(wxURL::ConvertFromURI(path));
if (retval->Ok()) {
return retval;
} else {
delete retval;
return 0;
}
#endif
}
#endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE