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

Unified Diff: chrome/browser/instant/instant_controller.cc

Issue 8322005: Crash fix. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 2 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: chrome/browser/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 538fa1c63560a6d62c9fa586403f12bc5b91a8b9..a186a7461ea28357951b90cf8a6597e1efdcab7f 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -232,8 +232,10 @@ bool InstantController::IsCurrent() {
bool InstantController::PrepareForCommit() {
// If we are not in the HIDDEN field trial, return the status of the preview.
- if (!InstantFieldTrial::IsHiddenExperiment(tab_contents_->profile()))
+ if (!tab_contents_ ||
+ !InstantFieldTrial::IsHiddenExperiment(tab_contents_->profile())) {
return IsCurrent();
+ }
TemplateURLService* model = TemplateURLServiceFactory::GetForProfile(
tab_contents_->profile());
« 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