mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 629845 (2/2) - GetRoot() returning null isn't unexpected. r=ehsan a=blocking-final
This commit is contained in:
parent
a2b5d8fea5
commit
fd359d7a1c
@ -530,11 +530,14 @@ nsHTMLEditor::BeginningOfDocument()
|
||||
nsresult res = GetSelection(getter_AddRefs(selection));
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
NS_ENSURE_TRUE(selection, NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
// get the root element
|
||||
nsIDOMElement *rootElement = GetRoot();
|
||||
NS_ENSURE_TRUE(rootElement, NS_ERROR_NULL_POINTER);
|
||||
|
||||
|
||||
// Get the root element.
|
||||
nsIDOMElement *rootElement = GetRoot();
|
||||
if (!rootElement) {
|
||||
NS_WARNING("GetRoot() returned a null pointer (mRootElement is null)");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// find first editable thingy
|
||||
PRBool done = PR_FALSE;
|
||||
nsCOMPtr<nsIDOMNode> curNode(rootElement), selNode;
|
||||
|
Loading…
Reference in New Issue
Block a user