adding a warning if we call close on the jpeg decoder without us having made it to the end of decoding

This commit is contained in:
pavlov%netscape.com 2001-02-26 04:59:40 +00:00
parent c455edff68
commit cc3b86f36b

View File

@ -178,6 +178,9 @@ NS_IMETHODIMP nsJPEGDecoder::Close()
PR_LOG(gJPEGlog, PR_LOG_DEBUG,
("[this=%p] nsJPEGDecoder::Close\n", this));
if (mState != JPEG_DONE && mState != JPEG_SINK_NON_JPEG_TRAILER)
NS_WARNING("Never finished decoding the JPEG.");
/* Step 8: Release JPEG decompression object */
/* This is an important step since it will release a good deal of memory. */