summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--remoting/jingle_glue/jingle_client.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/remoting/jingle_glue/jingle_client.cc b/remoting/jingle_glue/jingle_client.cc
index 6237629..6484e5a 100644
--- a/remoting/jingle_glue/jingle_client.cc
+++ b/remoting/jingle_glue/jingle_client.cc
@@ -168,6 +168,9 @@ void JingleClient::OnConnectionStateChanged(buzz::XmppEngine::State state) {
break;
case buzz::XmppEngine::STATE_CLOSED:
UpdateState(CLOSED);
+ // Client is destroyed by the TaskRunner after the client is
+ // closed. Reset the pointer so we don't try to use it later.
+ client_ = NULL;
break;
default:
NOTREACHED();