Fixed potential leak of alpha bits if image is destroyed before

being optimized
This commit is contained in:
troy%netscape.com 1998-08-12 05:40:03 +00:00
Родитель 9fcc472d50
Коммит 59379adc7d
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -919,14 +919,17 @@ void nsImageWin :: CleanUp(PRBool aCleanUpAll)
mHBitmap = nsnull;
mAlphaHBitmap = nsnull;
mAlphaBits = nsnull;
mIsOptimized = PR_FALSE;
}
if (mImageBits != nsnull)
if (mImageBits != nsnull) {
delete [] mImageBits;
if (mAlphaBits != nsnull)
mImageBits = nsnull;
}
if (mAlphaBits != nsnull) {
delete [] mAlphaBits;
mAlphaBits = nsnull;
}
// Should be an ISupports, so we can release
if (mColorMap != nsnull)