Index: Source/platform/heap/ThreadState.cpp |
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp |
index 60f6eca1fd0e166c6b6cb9ebf9d25e059b081568..a14cf3f5a67a423e64dc762dfe17db150ead8293 100644 |
--- a/Source/platform/heap/ThreadState.cpp |
+++ b/Source/platform/heap/ThreadState.cpp |
@@ -367,8 +367,10 @@ ThreadState::~ThreadState() |
delete m_heaps[i]; |
deleteAllValues(m_interruptors); |
**s_threadSpecific = 0; |
- s_mainThreadStackStart = 0; |
- s_mainThreadUnderestimatedStackSize = 0; |
+ if (isMainThread()) { |
+ s_mainThreadStackStart = 0; |
+ s_mainThreadUnderestimatedStackSize = 0; |
+ } |
} |
void ThreadState::init() |