#176047. Reverted bad code introduced in Nova -> Normandy -> Gromit generating frequent crashes.

This commit is contained in:
pierre 1998-06-25 23:40:06 +00:00
Родитель fbacb4a2d2
Коммит 9ad72f3ca0
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -351,7 +351,11 @@ void CHTMLView::SetContext(
if (mContext != NULL)
{
mContext->RemoveListener(this);
mContext->SetCompositor(NULL);
// mContext->SetCompositor(NULL);
// ^^^^^^^^Do NOT do this. If you do, layout will not be able
// to clean up properly. This is very bad.
// The compositor needs to stick around till the context is deleted.
// So the context shares the CSharableCompositor
mContext->RemoveUser(this);
// set pointer to this view in MWContext to NULL
mContext->ClearMWContextViewPtr(); // MUST BE LAST, AFTER POSSIBLE DELETION!