Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(853)

Unified Diff: remoting/webapp/me2mom/remoting.js

Issue 7744043: Avoid null dereference in updateStatistics(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/me2mom/remoting.js
diff --git a/remoting/webapp/me2mom/remoting.js b/remoting/webapp/me2mom/remoting.js
index acd1d1327eb2368a7be41cc799657ea62aa8249f..9c0760a045c15efd84cce98332f3581a56d554c5 100644
--- a/remoting/webapp/me2mom/remoting.js
+++ b/remoting/webapp/me2mom/remoting.js
@@ -358,6 +358,8 @@ remoting.cancelShare = function() {
}
function updateStatistics() {
+ if (!remoting.session)
+ return;
Jamie 2011/08/25 22:57:14 I think I'd combine these with || rather than havi
Lambros 2011/08/25 23:11:30 I prefer to leave as-is, if that's OK. I find con
if (remoting.session.state != remoting.ClientSession.State.CONNECTED)
return;
var stats = remoting.session.stats();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698