зеркало из https://github.com/mozilla/pjs.git
r=brade, sr=kin, a=asa domSelection can be null if there is no presShell - don't dereference it
This commit is contained in:
Родитель
82345876f3
Коммит
6e53484b55
|
@ -368,13 +368,15 @@ nsComposerCommandsUpdater::SelectionIsCollapsed()
|
|||
if (!mDOMWindow) return PR_TRUE;
|
||||
|
||||
nsCOMPtr<nsISelection> domSelection;
|
||||
if (NS_SUCCEEDED(mDOMWindow->GetSelection(getter_AddRefs(domSelection))))
|
||||
{
|
||||
if (NS_SUCCEEDED(mDOMWindow->GetSelection(getter_AddRefs(domSelection))) && domSelection)
|
||||
{
|
||||
PRBool selectionCollapsed = PR_FALSE;
|
||||
domSelection->GetIsCollapsed(&selectionCollapsed);
|
||||
return selectionCollapsed;
|
||||
}
|
||||
|
||||
NS_WARNING("nsComposerCommandsUpdater::SelectionIsCollapsed - no domSelection");
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче