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
wxInt32 anih32;
memcpy( &anih32, "anih", 4 );
- if ( stream.SeekI(0) == wxInvalidOffset )
+ if ( stream.IsSeekable() && stream.SeekI(0) == wxInvalidOffset )
{
return false;
}
wxInt32 seq32;
memcpy( &seq32, "seq ", 4 );
- if ( stream.SeekI(0) == wxInvalidOffset)
+ if ( stream.IsSeekable() && stream.SeekI(0) == wxInvalidOffset )
{
return false;
}
bool wxICOHandler::LoadFile(wxImage *image, wxInputStream& stream,
bool verbose, int index)
{
- if (stream.SeekI(0) == wxInvalidOffset)
+ if ( stream.IsSeekable() && stream.SeekI(0) == wxInvalidOffset )
{
return false;
}
{
// It's ok to modify the stream position in this function.
- if (stream.SeekI(0) == wxInvalidOffset)
+ if ( stream.IsSeekable() && stream.SeekI(0) == wxInvalidOffset )
{
return 0;
}
{
// It's ok to modify the stream position in this function.
- if ( stream->SeekI(0) == wxInvalidOffset)
+ if ( stream->IsSeekable() && stream->SeekI(0) == wxInvalidOffset )
{
return false;
}