From d4d9b2dcd8945966c534bdec1fab1d2cbafbbd7b Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Tue, 13 Nov 2012 10:24:08 -0800 Subject: [PATCH] Bug 810987: Followup bustage fix. --- js/xpconnect/loader/mozJSSubScriptLoader.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/xpconnect/loader/mozJSSubScriptLoader.cpp b/js/xpconnect/loader/mozJSSubScriptLoader.cpp index 156b910d029..9acb29828a0 100644 --- a/js/xpconnect/loader/mozJSSubScriptLoader.cpp +++ b/js/xpconnect/loader/mozJSSubScriptLoader.cpp @@ -182,8 +182,10 @@ mozJSSubScriptLoader::LoadSubScript(const nsAString& url, if (!targetObj) { // If the user didn't provide an object to eval onto, find one. mozJSComponentLoader* loader = mozJSComponentLoader::Get(); - rv = loader->FindTargetObject(cx, &targetObj); - NS_ENSURE_SUCCESS(rv, rv); + if (loader) { + rv = loader->FindTargetObject(cx, &targetObj); + NS_ENSURE_SUCCESS(rv, rv); + } } // Remember an object out of the calling compartment so that we