diff options
-rw-r--r-- | remoting/jingle_glue/jingle_thread.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/remoting/jingle_glue/jingle_thread.cc b/remoting/jingle_glue/jingle_thread.cc index d31857e..742e3b1 100644 --- a/remoting/jingle_glue/jingle_thread.cc +++ b/remoting/jingle_glue/jingle_thread.cc @@ -144,7 +144,14 @@ JingleThread::JingleThread() message_loop_(NULL) { } -JingleThread::~JingleThread() { } +JingleThread::~JingleThread() { + // It is important to call Stop here. If we wait for the base class to + // call Stop in it's d'tor, then JingleThread::Run() will access member + // variables that are already gone. See similar comments in + // base/threading/thread.h. + if (message_loop_) + Stop(); +} void JingleThread::Start() { Thread::Start(); |