From d18d0419b91292a9218df345dedd7b3882f6b475 Mon Sep 17 00:00:00 2001 From: Peter Van der Beken Date: Thu, 24 Mar 2011 11:53:28 +0100 Subject: [PATCH] Fix for bug 617247 (Don't call HoldScriptObject if we don't have a script object). r=sicking. --HG-- extra : rebase_source : cba480742dc8a2fe356b6b65c10ea1e0b6023730 --- content/xul/content/src/nsXULElement.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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,