mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
r=brade, sr=kin, a=asa domSelection can be null if there is no presShell - don't dereference it
This commit is contained in:
parent
5cc66223d8
commit
8722e3bb55
@ -368,13 +368,15 @@ nsComposerCommandsUpdater::SelectionIsCollapsed()
|
|||||||
if (!mDOMWindow) return PR_TRUE;
|
if (!mDOMWindow) return PR_TRUE;
|
||||||
|
|
||||||
nsCOMPtr<nsISelection> domSelection;
|
nsCOMPtr<nsISelection> domSelection;
|
||||||
if (NS_SUCCEEDED(mDOMWindow->GetSelection(getter_AddRefs(domSelection))))
|
if (NS_SUCCEEDED(mDOMWindow->GetSelection(getter_AddRefs(domSelection))) && domSelection)
|
||||||
{
|
{
|
||||||
PRBool selectionCollapsed = PR_FALSE;
|
PRBool selectionCollapsed = PR_FALSE;
|
||||||
domSelection->GetIsCollapsed(&selectionCollapsed);
|
domSelection->GetIsCollapsed(&selectionCollapsed);
|
||||||
return selectionCollapsed;
|
return selectionCollapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_WARNING("nsComposerCommandsUpdater::SelectionIsCollapsed - no domSelection");
|
||||||
|
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user