Bug 803255. Ensure previous document viewer is cleared when creating a new one to avoid leaking the old one. r=bz

This commit is contained in:
Felipe Gomes 2012-11-12 13:00:19 -08:00
Родитель 08e5b80f4e
Коммит d158dec950
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -909,6 +909,12 @@ DocumentViewerImpl::InitInternal(nsIWidget* aParentWidget,
mPresContext->SetPageScale(1.0f);
}
#endif
} else {
// Avoid leaking the old viewer.
if (mPreviousViewer) {
mPreviousViewer->Destroy();
mPreviousViewer = nullptr;
}
}
}