From 9a646f54ab2888a751e51a38fd3b738de3c21221 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Mon, 11 Oct 2010 12:35:40 -0400 Subject: [PATCH] Bug 602948 - ASSERTION: null node passed to nsHTMLEditUtils::IsMozBR and nsEditor::Tag when entering text in input controls focused by code or tabbing into them; r,a=roc --HG-- extra : rebase_source : 2ab9b687f8cf6afbd464841f1c3cfbc0f38adeaa --- editor/libeditor/base/nsEditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/libeditor/base/nsEditor.cpp b/editor/libeditor/base/nsEditor.cpp index 46ad08478448..727346c449e8 100644 --- a/editor/libeditor/base/nsEditor.cpp +++ b/editor/libeditor/base/nsEditor.cpp @@ -2320,8 +2320,8 @@ NS_IMETHODIMP nsEditor::InsertTextImpl(const nsAString& aStringToInsert, res = (*aInOutNode)->GetChildNodes(getter_AddRefs(children)); if (NS_SUCCEEDED(res)) { nsCOMPtr possibleMozBRNode; - res = children->Item(*aInOutOffset, getter_AddRefs(possibleMozBRNode)); - if (NS_SUCCEEDED(res) && nsTextEditUtils::IsMozBR(possibleMozBRNode)) { + children->Item(*aInOutOffset, getter_AddRefs(possibleMozBRNode)); + if (possibleMozBRNode && nsTextEditUtils::IsMozBR(possibleMozBRNode)) { nsCOMPtr possibleTextNode; res = children->Item(*aInOutOffset - 1, getter_AddRefs(possibleTextNode)); if (NS_SUCCEEDED(res)) {