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
This commit is contained in:
Ehsan Akhgari 2010-10-11 12:35:40 -04:00
Родитель b155490ccf
Коммит 9a646f54ab
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -2320,8 +2320,8 @@ NS_IMETHODIMP nsEditor::InsertTextImpl(const nsAString& aStringToInsert,
res = (*aInOutNode)->GetChildNodes(getter_AddRefs(children));
if (NS_SUCCEEDED(res)) {
nsCOMPtr<nsIDOMNode> 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<nsIDOMNode> possibleTextNode;
res = children->Item(*aInOutOffset - 1, getter_AddRefs(possibleTextNode));
if (NS_SUCCEEDED(res)) {