fix compiler warning introduced by bug 170353

This commit is contained in:
brade%netscape.com 2002-11-13 15:45:34 +00:00
Родитель 1036c410b8
Коммит dc5d534dae
1 изменённых файлов: 7 добавлений и 12 удалений

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

@ -359,19 +359,14 @@ nsComposerCommandsUpdater::SelectionIsCollapsed()
{
if (!mDOMWindow) return PR_TRUE;
nsresult rv;
// we don't care too much about failures here.
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsISelection> domSelection;
rv = mDOMWindow->GetSelection(getter_AddRefs(domSelection));
if (NS_SUCCEEDED(rv))
{
PRBool selectionCollapsed = PR_FALSE;
rv = domSelection->GetIsCollapsed(&selectionCollapsed);
return selectionCollapsed;
}
nsCOMPtr<nsISelection> domSelection;
if (NS_SUCCEEDED(mDOMWindow->GetSelection(getter_AddRefs(domSelection))))
{
PRBool selectionCollapsed = PR_FALSE;
domSelection->GetIsCollapsed(&selectionCollapsed);
return selectionCollapsed;
}
return PR_FALSE;
}