Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
index 927cdc6ef06eb132d4229d1cc011b0ab81f70d42..01eab7fe8e6367f4e0b3a0fd8567323a792450ed 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
@@ -182,7 +182,7 @@ Background.prototype = { |
case 'continuousRead': |
global.isReadingContinuously = true; |
var continueReading = function(prevRange) { |
- if (!global.isReadingContinuously) |
+ if (!global.isReadingContinuously || !this.currentRange_) |
return; |
new Output().withSpeechAndBraille( |
@@ -193,7 +193,7 @@ Background.prototype = { |
this.currentRange_ = |
this.currentRange_.move(cursors.Unit.NODE, Dir.FORWARD); |
- if (this.currentRange_.equals(prevRange)) |
+ if (!this.currentRange_ || this.currentRange_.equals(prevRange)) |
global.isReadingContinuously = false; |
}.bind(this); |