X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf34105a41faf8e267354e7a96eb1b1e847580da..abd474ea63667f727940a009cc3e0b23ba9f418f:/src/common/imagbmp.cpp diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index 875da6e3f0..631130805c 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -91,7 +91,7 @@ bool wxBMPHandler::SaveDib(wxImage *image, { wxCHECK_MSG( image, false, wxT("invalid pointer in wxBMPHandler::SaveFile") ); - if ( !image->Ok() ) + if ( !image->IsOk() ) { if ( verbose ) { @@ -351,7 +351,7 @@ bool wxBMPHandler::SaveDib(wxImage *image, // pointer to the image data, use quantized if available wxUint8 *data = (wxUint8*) image->GetData(); - if (q_image) if (q_image->Ok()) data = (wxUint8*) q_image->GetData(); + if (q_image) if (q_image->IsOk()) data = (wxUint8*) q_image->GetData(); wxUint8 *buffer = new wxUint8[row_width]; memset(buffer, 0, row_width); @@ -1249,7 +1249,7 @@ bool wxICOHandler::SaveFile(wxImage *image, // wxCountingOutputStream::IsOk() always returns true for now and this // "if" provokes VC++ warnings in optimized build #if 0 - if ( !cStream.Ok() ) + if ( !cStream.IsOk() ) { if ( verbose ) { @@ -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; }