diff --git a/layout/style/nsStyleContext.cpp b/layout/style/nsStyleContext.cpp index 6fd271667b..da0853c7cc 100644 --- a/layout/style/nsStyleContext.cpp +++ b/layout/style/nsStyleContext.cpp @@ -160,10 +160,10 @@ nsStyleContext::~nsStyleContext() #endif nsPresContext *presContext = PresContext(); - DebugOnly geckoStyleSet = presContext->PresShell()->StyleSet()->GetAsGecko(); - NS_ASSERTION(!geckoStyleSet || - geckoStyleSet->GetRuleTree() == mSource.AsGeckoRuleNode()->RuleTree() || - geckoStyleSet->IsInRuleTreeReconstruct(), + DebugOnly styleSet = presContext->PresShell()->StyleSet()->GetAsGecko(); + NS_ASSERTION(!styleSet || + styleSet->GetRuleTree() == mRuleNode->RuleTree() || + styleSet->IsInRuleTreeReconstruct(), "destroying style context from old rule tree too late"); if (mParent) {