always remember to test IsOk() after using wxFileInputStream

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2009-01-08 18:26:35 +00:00
parent 35510e483f
commit 9690b00654
7 changed files with 38 additions and 12 deletions

View File

@@ -609,7 +609,7 @@ bool wxDocument::DoOpenDocument(const wxString& file)
if ( !store )
#else
wxFileInputStream store(file);
if (store.GetLastError() != wxSTREAM_NO_ERROR)
if (store.GetLastError() != wxSTREAM_NO_ERROR || !store.IsOk())
#endif
{
wxLogError(_("File \"%s\" could not be opened for reading."), file);