diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index f035dc48f253..2f026e56c986 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -3264,7 +3264,9 @@ nsJSContext::GarbageCollectNow() sPendingLoadCount = 0; sLoadingInProgress = PR_FALSE; - nsContentUtils::XPConnect()->GarbageCollect(); + if (nsContentUtils::XPConnect()) { + nsContentUtils::XPConnect()->GarbageCollect(); + } } //Static