X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1b806b98241ab649c169aaa1f134df85e80fb8b..7198c3368055d88249a338eb33b21f051f674806:/src/common/imagbmp.cpp diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index 71dd36d635..631130805c 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -1335,7 +1335,7 @@ bool wxICOHandler::SaveFile(wxImage *image, 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; } @@ -1430,7 +1430,7 @@ int wxICOHandler::DoGetImageCount(wxInputStream& stream) { // 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; } @@ -1505,7 +1505,7 @@ static bool CanReadICOOrCUR(wxInputStream *stream, wxUint16 resourceType) { // 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; }