diff options
Diffstat (limited to 'src/vm/frames.cpp')
-rw-r--r-- | src/vm/frames.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vm/frames.cpp b/src/vm/frames.cpp index 365964512e..bc1d48e252 100644 --- a/src/vm/frames.cpp +++ b/src/vm/frames.cpp @@ -479,6 +479,19 @@ VOID Frame::Pop(Thread *pThread) pThread->SetFrame(m_Next); } +#ifdef FEATURE_PAL +Frame::~Frame() +{ + // When the frame is destroyed, make sure it is no longer in the + // frame chain managed by the Thread. + Thread* pThread = GetThread(); + if (pThread != NULL && pThread->GetFrame() == this) + { + Pop(pThread); + } +} +#endif FEATURE_PAL + //----------------------------------------------------------------------- #endif // #ifndef DACCESS_COMPILE //--------------------------------------------------------------- |