diff --git a/modules/libpr0n/src/imgRequest.cpp b/modules/libpr0n/src/imgRequest.cpp index 9f1fb3d11bc5..8f5318926744 100644 --- a/modules/libpr0n/src/imgRequest.cpp +++ b/modules/libpr0n/src/imgRequest.cpp @@ -291,7 +291,9 @@ void imgRequest::Cancel(nsresult aStatus) if (!(mImageStatus & imgIRequest::STATUS_LOAD_PARTIAL)) mImageStatus |= imgIRequest::STATUS_ERROR; - RemoveFromCache(); + if (aStatus != NS_IMAGELIB_ERROR_NO_DECODER) { + RemoveFromCache(); + } if (mRequest && mLoading) mRequest->Cancel(aStatus);