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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user