X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf34105a41faf8e267354e7a96eb1b1e847580da..be1c0bc6ba241a89fc167bd4bfb19a78e02a549f:/src/common/anidecod.cpp diff --git a/src/common/anidecod.cpp b/src/common/anidecod.cpp index 2cb075948d..d62c00b455 100644 --- a/src/common/anidecod.cpp +++ b/src/common/anidecod.cpp @@ -2,7 +2,6 @@ // Name: src/common/anidecod.cpp // Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation // Author: Francesco Montorsi -// RCS-ID: $Id$ // Copyright: (c) Francesco Montorsi // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -127,7 +126,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 +224,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; }