diff options
Diffstat (limited to 'jingle/glue/thread_wrapper.cc')
-rw-r--r-- | jingle/glue/thread_wrapper.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/jingle/glue/thread_wrapper.cc b/jingle/glue/thread_wrapper.cc index 036122b..6983087 100644 --- a/jingle/glue/thread_wrapper.cc +++ b/jingle/glue/thread_wrapper.cc @@ -224,8 +224,14 @@ void JingleThreadWrapper::RunTask(int task_id) { } } - if (have_message) - message.phandler->OnMessage(&message); + if (have_message) { + if (message.message_id == talk_base::MQID_DISPOSE) { + DCHECK(message.phandler == NULL); + delete message.pdata; + } else { + message.phandler->OnMessage(&message); + } + } } // All methods below are marked as not reached. See comments in the |