mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 432025 - Crash [@ CallQueryInterface<nsIDOMElement, nsIContent>], r+sr=peterv
This commit is contained in:
parent
ad998ea5bb
commit
a4de4c1089
@ -1042,13 +1042,12 @@ FindSelectionRoot(nsIEditor *aEditor, nsIContent *aContent)
|
||||
// We still want to allow selection in a readonly editor.
|
||||
nsCOMPtr<nsIDOMElement> rootElement;
|
||||
aEditor->GetRootElement(getter_AddRefs(rootElement));
|
||||
if (!rootElement) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
CallQueryInterface(rootElement, &root);
|
||||
|
||||
if (!root && document) {
|
||||
NS_IF_ADDREF(root = document->GetRootContent());
|
||||
}
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user