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

Unified Diff: chrome/browser/dom_ui/dom_ui_contents.cc

Issue 46009: Fix a crash when with chrome-ui://about/" or anything invalid... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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/dom_ui/dom_ui_contents.cc
===================================================================
--- chrome/browser/dom_ui/dom_ui_contents.cc (revision 11545)
+++ chrome/browser/dom_ui/dom_ui_contents.cc (working copy)
@@ -194,7 +194,7 @@
void DOMUIContents::SetInitialFocus() {
if (InitCurrentUI(false))
current_ui_->SetInitialFocus();
- else
+ else if (current_ui_)
current_ui_->get_contents()->view()->SetInitialFocus();
}
@@ -257,11 +257,11 @@
if (current_ui_) {
current_ui_->Init();
current_url_ = url;
- return true;
}
- } else if (current_ui_) {
+ }
+
+ if (current_ui_)
return true;
- }
return false;
}
« 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