diff --git a/content/base/src/nsGenericElement.cpp b/content/base/src/nsGenericElement.cpp index bd343023eb66..f903e4658420 100644 --- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -2445,7 +2445,7 @@ nsGenericElement::doInsertBefore(nsIDOMNode* aNewChild, return res; } - if (!do_notify && mDocument) { + if (count && !do_notify && mDocument) { mDocument->ContentAppended(this, old_count); }