summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-08 22:11:59 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-08 22:11:59 +0000
commit452749dc3ed89abb72aab90dc48aca43b7f7e166 (patch)
tree0fc334af72e3c655405b47540dec268caa6bfab2 /remoting
parent332aeb4c563f163c220c9814a59b0e326a1bcbca (diff)
downloadchromium_src-452749dc3ed89abb72aab90dc48aca43b7f7e166.zip
chromium_src-452749dc3ed89abb72aab90dc48aca43b7f7e166.tar.gz
chromium_src-452749dc3ed89abb72aab90dc48aca43b7f7e166.tar.bz2
Fix chromoting client crash.
The client plugin may crash if a signaling message is receive before the client started connection. It's likely to be a leftover from a previous session, so it's safe to ignore it. BUG=226775 Review URL: https://chromiumcodereview.appspot.com/13594011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192923 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/client/plugin/chromoting_instance.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index fef612e..aff8c10 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -650,7 +650,10 @@ void ChromotingInstance::Disconnect() {
}
void ChromotingInstance::OnIncomingIq(const std::string& iq) {
- xmpp_proxy_->OnIq(iq);
+ // Just ignore the message if it's received before Connect() is called. It's
+ // likely to be a leftover from a previous session, so it's safe to ignore it.
+ if (xmpp_proxy_)
+ xmpp_proxy_->OnIq(iq);
}
void ChromotingInstance::ReleaseAllKeys() {