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

Unified Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc

Issue 10826185: Fix crash in WebsiteSettingsPopupView::OnWidgetClosing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 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 | « chrome/browser/ui/views/website_settings/website_settings_popup_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
diff --git a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
index 524e796ba04fd30e251e6922c1739f66c42dbc99..aed4c2192ddef24f70d9385eb53e248fac04525f 100644
--- a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
+++ b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
@@ -334,6 +334,8 @@ WebsiteSettingsPopupView::WebsiteSettingsPopupView(
void WebsiteSettingsPopupView::OnPermissionChanged(
PermissionSelectorView* permission_selector) {
DCHECK(permission_selector);
+ // It's not necessary to check that the |presenter_| is not NULL since for
+ // internal chrome pages OnPermissionChanged can't be called.
presenter_->OnSitePermissionChanged(
permission_selector->GetPermissionType(),
permission_selector->GetSelectedSetting());
@@ -348,7 +350,8 @@ gfx::Rect WebsiteSettingsPopupView::GetAnchorRect() {
}
void WebsiteSettingsPopupView::OnWidgetClosing(views::Widget* widget) {
- presenter_->OnUIClosing();
+ if (presenter_.get())
+ presenter_->OnUIClosing();
}
void WebsiteSettingsPopupView::ButtonPressed(
« no previous file with comments | « chrome/browser/ui/views/website_settings/website_settings_popup_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698