diff --git a/content/xul/content/src/nsXULElement.h b/content/xul/content/src/nsXULElement.h index 034b65842a8..e58d26e42be 100644 --- a/content/xul/content/src/nsXULElement.h +++ b/content/xul/content/src/nsXULElement.h @@ -359,7 +359,9 @@ public: { NS_ASSERTION(!mScriptObject.mObject, "Leaking script object."); if (!aObject) { - return; + mScriptObject.mObject = nsnull; + + return; } nsresult rv = nsContentUtils::HoldScriptObject(mScriptObject.mLangID,