Bug 634916 - Crash on shutdown [@ nsCycleCollector_collect] in DEBUG_CC code, r=peterv, a=NPOTB
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Thu, 17 Feb 2011 19:50:53 +0200
changeset 62750 e66fc103a55eb1781c529302fd494f11cc42df28
parent 62749 7f8e4c2ca53f2c51b26226f9153f52123e9120fa
child 62751 be20deb20fd7ad96dac3ec45bddf11442e325852
child 62793 a2b20c2d773e612b0958e0d7d1662e9f910ca53e
push idunknown
push userunknown
push dateunknown
reviewerspeterv, NPOTB
bugs634916
milestone2.0b12pre
Bug 634916 - Crash on shutdown [@ nsCycleCollector_collect] in DEBUG_CC code, r=peterv, a=NPOTB
xpcom/base/nsCycleCollector.cpp
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -3462,17 +3462,17 @@ nsCycleCollector_startup()
 }
 
 PRUint32
 nsCycleCollector_collect(nsICycleCollectorListener *aListener)
 {
     NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
     nsCOMPtr<nsICycleCollectorListener> listener(aListener);
 #ifdef DEBUG_CC
-    if (!aListener && sCollector->mParams.mDrawGraphs) {
+    if (!aListener && sCollector && sCollector->mParams.mDrawGraphs) {
         listener = new nsCycleCollectorLogger();
     }
 #endif
 
     if (sCollectorRunner)
         return sCollectorRunner->Collect(listener);
     return sCollector ? sCollector->Collect(1, listener) : 0;
 }