diff --git a/docshell/base/BrowsingContext.cpp b/docshell/base/BrowsingContext.cpp index bb43ea4d6e2a..dbec320a7f9f 100644 --- a/docshell/base/BrowsingContext.cpp +++ b/docshell/base/BrowsingContext.cpp @@ -283,7 +283,7 @@ void BrowsingContext::Detach(bool aFromIPC) { RefPtr kungFuDeathGrip(this); - if (!Group()->EvictCachedContext(this)) { + if (Group() && !Group()->EvictCachedContext(this)) { Children* children = nullptr; if (mParent) { children = &mParent->mChildren;