bulletproof for crasher in nsHTMLEditor::HideResizers()
r=brade,sr=kin
This commit is contained in:
sspitzer%netscape.com 2003-03-22 17:22:22 +00:00
Родитель aa6a147de8
Коммит bb2efc3630
1 изменённых файлов: 8 добавлений и 3 удалений

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

@ -618,9 +618,14 @@ nsHTMLEditor::HideResizers(void)
nsCOMPtr<nsIDOMNode> parentNode;
res = mResizedObject->GetParentNode(getter_AddRefs(parentNode));
erP = do_QueryInterface(parentNode);
res = erP->RemoveEventListener(NS_LITERAL_STRING("DOMNodeRemoved"), mMutationListenerP, PR_FALSE);
NS_ASSERTION(NS_SUCCEEDED(res), "failed to remove NodeRemoved event listener");
NS_ASSERTION(erP, "Failed to get event receiver!");
if (erP)
{
res = erP->RemoveEventListener(NS_LITERAL_STRING("DOMNodeRemoved"),
mMutationListenerP, PR_FALSE);
NS_ASSERTION(NS_SUCCEEDED(res),
"failed to remove NodeRemoved event listener");
}
mMutationListenerP = nsnull;
res = GetDOMEventReceiver(getter_AddRefs(erP));