Fixed failing to load ANI, BMP, and ICO images from non-seekable streams.
Guarded recently added SeekI() calls by calling is IsSeekable() first. Regression since r67671. Closes #12861 (again). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -127,7 +127,7 @@ bool wxANIDecoder::DoCanRead(wxInputStream& stream) const
|
||||
wxInt32 anih32;
|
||||
memcpy( &anih32, "anih", 4 );
|
||||
|
||||
if ( stream.SeekI(0) == wxInvalidOffset )
|
||||
if ( stream.IsSeekable() && stream.SeekI(0) == wxInvalidOffset )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ bool wxANIDecoder::Load( wxInputStream& stream )
|
||||
wxInt32 seq32;
|
||||
memcpy( &seq32, "seq ", 4 );
|
||||
|
||||
if ( stream.SeekI(0) == wxInvalidOffset)
|
||||
if ( stream.IsSeekable() && stream.SeekI(0) == wxInvalidOffset )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user