summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-03 00:19:28 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-03 00:19:28 +0000
commit1937df51d1bdcabbad5523243108d4bba40a1695 (patch)
treee1cf30c44b138614fec1b83aef55390ea1416d4a /remoting
parenteb68c596f0883a539386eed7a11c8a3da0aa529a (diff)
downloadchromium_src-1937df51d1bdcabbad5523243108d4bba40a1695.zip
chromium_src-1937df51d1bdcabbad5523243108d4bba40a1695.tar.gz
chromium_src-1937df51d1bdcabbad5523243108d4bba40a1695.tar.bz2
Fix crash when shutting down xmpp connection.
BUG=None TEST=Client doesn't crash when shuttind down connection. Review URL: http://codereview.chromium.org/5604002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68113 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-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();