crash when doing multiple redo commands in Composer; r=brade, sr=peterv, a=sspitzer

This commit is contained in:
glazman%netscape.com 2003-05-16 09:08:03 +00:00
Родитель 6fb4e51cdf
Коммит b55b32437c
1 изменённых файлов: 8 добавлений и 9 удалений

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

@ -1033,16 +1033,15 @@ nsHTMLEditor::CheckResizingState(nsISelection *aSelection)
}
}
PRUint16 nodeType;
focusNode->GetNodeType(&nodeType);
if (nsIDOMNode::TEXT_NODE == nodeType) {
nsCOMPtr<nsIDOMNode> parent;
res = focusNode->GetParentNode(getter_AddRefs(parent));
if (NS_FAILED(res)) return res;
focusNode = parent;
}
if (focusNode) {
PRUint16 nodeType;
focusNode->GetNodeType(&nodeType);
if (nsIDOMNode::TEXT_NODE == nodeType) {
nsCOMPtr<nsIDOMNode> parent;
res = focusNode->GetParentNode(getter_AddRefs(parent));
if (NS_FAILED(res)) return res;
focusNode = parent;
}
nsCOMPtr<nsIDOMElement>element;
element = do_QueryInterface(focusNode);