Checked for stream validity in wxImage::GetImageCount.

use horse3.ani in image sample.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-12-05 10:19:00 +00:00
parent d643b80eb9
commit 088117622c
2 changed files with 6 additions and 3 deletions

View File

@@ -1005,7 +1005,10 @@ int wxImage::GetImageCount( const wxString &name, long type )
{
#if wxUSE_STREAMS
wxFileInputStream stream(name);
return GetImageCount(stream, type);
if (!stream.Ok())
return 0;
else
return GetImageCount(stream, type);
#else
return 0;
#endif