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