diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp index 75922c640b5d..d108c16fd82a 100644 --- a/layout/style/nsStyleSet.cpp +++ b/layout/style/nsStyleSet.cpp @@ -765,6 +765,8 @@ nsStyleSet::NotifyStyleContextDestroyed(nsPresContext* aPresContext, if (mInShutdown) return; + NS_ASSERTION(mRuleWalker->AtRoot(), "Rule walker should be at root"); + if (!aStyleContext->GetParent()) { mRoots.RemoveElement(aStyleContext); } @@ -781,7 +783,6 @@ nsStyleSet::NotifyStyleContextDestroyed(nsPresContext* aPresContext, } // Sweep the rule tree. - NS_ASSERTION(mRuleWalker->AtRoot(), "Rule walker should be at root"); #ifdef DEBUG PRBool deleted = #endif