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

@@ -497,7 +497,7 @@ bool wxXmlResource::UpdateResources()
delete rec->Doc;
rec->Doc = new wxXmlDocument;
}
if (!stream || !rec->Doc->Load(*stream, encoding))
if (!stream || !stream->IsOk() || !rec->Doc->Load(*stream, encoding))
{
wxLogError(_("Cannot load resources from file '%s'."),
rec->File);