Bug 686345 - Don't subtract from our count of canvas's memory if we never added to the count. r=jmuizelaar

This commit is contained in:
Justin Lebar 2011-10-03 12:35:32 -04:00
Родитель efc8de2960
Коммит 24bdf2ca79
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -852,7 +852,7 @@ nsCanvasRenderingContext2D::Reset()
// only do this for non-docshell created contexts,
// since those are the ones that we created a surface for
if (mValid && !mDocShell)
if (mValid && !mDocShell && mSurface)
gCanvasMemoryUsed -= mWidth * mHeight * 4;
mSurface = nsnull;