mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
fix for bug#48472
apparently nsIContent::ChildAt can be successful and not return a child. now checking fo that. r: smfr a: beppe
This commit is contained in:
parent
df3cdee5ef
commit
9d506576cb
@ -4246,7 +4246,8 @@ nsDOMSelection::AddRange(nsIDOMRange* aRange)
|
||||
nsCOMPtr<nsIContent> childAt;
|
||||
if (NS_SUCCEEDED(content->ChildAt(startOffset, *getter_AddRefs(childAt))))
|
||||
{
|
||||
if (NS_SUCCEEDED(childAt->GetTag(atom)) && atom == nsSelection::sTableAtom)
|
||||
if ( (childAt) &&
|
||||
(NS_SUCCEEDED(childAt->GetTag(atom)) && atom == nsSelection::sTableAtom) )
|
||||
{
|
||||
mFrameSelection->mSelectingTableCellMode = TABLESELECTION_TABLE;
|
||||
}
|
||||
|
@ -4246,7 +4246,8 @@ nsDOMSelection::AddRange(nsIDOMRange* aRange)
|
||||
nsCOMPtr<nsIContent> childAt;
|
||||
if (NS_SUCCEEDED(content->ChildAt(startOffset, *getter_AddRefs(childAt))))
|
||||
{
|
||||
if (NS_SUCCEEDED(childAt->GetTag(atom)) && atom == nsSelection::sTableAtom)
|
||||
if ( (childAt) &&
|
||||
(NS_SUCCEEDED(childAt->GetTag(atom)) && atom == nsSelection::sTableAtom) )
|
||||
{
|
||||
mFrameSelection->mSelectingTableCellMode = TABLESELECTION_TABLE;
|
||||
}
|
||||
|
@ -4246,7 +4246,8 @@ nsDOMSelection::AddRange(nsIDOMRange* aRange)
|
||||
nsCOMPtr<nsIContent> childAt;
|
||||
if (NS_SUCCEEDED(content->ChildAt(startOffset, *getter_AddRefs(childAt))))
|
||||
{
|
||||
if (NS_SUCCEEDED(childAt->GetTag(atom)) && atom == nsSelection::sTableAtom)
|
||||
if ( (childAt) &&
|
||||
(NS_SUCCEEDED(childAt->GetTag(atom)) && atom == nsSelection::sTableAtom) )
|
||||
{
|
||||
mFrameSelection->mSelectingTableCellMode = TABLESELECTION_TABLE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user