зеркало из https://github.com/mozilla/pjs.git
Bug 345670: fix crash in nsTypeAheadFind::RangeStartsInsideLink, patch by Adam Guthrie <ispiked@gmail.com>, r+sr=sicking
This commit is contained in:
Родитель
749856758e
Коммит
806720f7ae
|
@ -1649,7 +1649,7 @@ nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
|
|||
if (parent) {
|
||||
nsIContent *parentsFirstChild = parent->GetChildAt(0);
|
||||
// We don't want to look at a whitespace-only first child
|
||||
if (parentsFirstChild->TextIsOnlyWhitespace())
|
||||
if (parentsFirstChild && parentsFirstChild->TextIsOnlyWhitespace())
|
||||
parentsFirstChild = parent->GetChildAt(1);
|
||||
|
||||
if (parentsFirstChild != startContent) {
|
||||
|
|
|
@ -852,7 +852,7 @@ nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
|
|||
nsIContent *parentsFirstChild = parent->GetChildAt(0);
|
||||
|
||||
// We don't want to look at a whitespace-only first child
|
||||
if (parentsFirstChild->TextIsOnlyWhitespace()) {
|
||||
if (parentsFirstChild && parentsFirstChild->TextIsOnlyWhitespace()) {
|
||||
parentsFirstChild = parent->GetChildAt(1);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче