summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorengedy@chromium.org <engedy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-09 14:02:49 +0000
committerengedy@chromium.org <engedy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-09 14:02:49 +0000
commit51342ded2dd771ab14ff3f6f463d76db5921a9ad (patch)
treeaba9295dade43aef53348ae0031f40b03fa6b8bb
parentbac52459c2d29cd5b4eadee280122e84f4a6ad0a (diff)
downloadchromium_src-51342ded2dd771ab14ff3f6f463d76db5921a9ad.zip
chromium_src-51342ded2dd771ab14ff3f6f463d76db5921a9ad.tar.gz
chromium_src-51342ded2dd771ab14ff3f6f463d76db5921a9ad.tar.bz2
Merge 242295 "Fix NULL pointer crash triggered by ResetProfileSe..."
> Fix NULL pointer crash triggered by ResetProfileSettingsHandler::InitializePage(). > > Added nullity checks around usages of |automatic_profile_resetter_| introduced by r240179 in ResetProfileSettingsHandler, as this pointer may be NULL when signed in as guest. > > BUG=330337 > R=engedy@chromium.org > TBR=bauerb@chromium.org > TEST=verify that settings page no longer crashes when signed in as guest. > > Review URL: https://codereview.chromium.org/120043004 TBR=hshi@chromium.org Review URL: https://codereview.chromium.org/131803002 git-svn-id: svn://svn.chromium.org/chrome/branches/1750/src@243884 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/webui/options/reset_profile_settings_handler.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/ui/webui/options/reset_profile_settings_handler.cc b/chrome/browser/ui/webui/options/reset_profile_settings_handler.cc
index 9c3ea68..9497afd 100644
--- a/chrome/browser/ui/webui/options/reset_profile_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/reset_profile_settings_handler.cc
@@ -46,7 +46,8 @@ void ResetProfileSettingsHandler::InitializePage() {
web_ui()->CallJavascriptFunction(
"ResetProfileSettingsOverlay.setResettingState",
base::FundamentalValue(resetter_->IsActive()));
- if (automatic_profile_resetter_->ShouldShowResetBanner())
+ if (automatic_profile_resetter_ &&
+ automatic_profile_resetter_->ShouldShowResetBanner())
web_ui()->CallJavascriptFunction("ResetProfileSettingsBanner.show");
}
@@ -155,7 +156,8 @@ void ResetProfileSettingsHandler::OnShowResetProfileDialog(const ListValue*) {
void ResetProfileSettingsHandler::OnDismissedResetProfileSettingsBanner(
const base::ListValue* args) {
- automatic_profile_resetter_->NotifyDidCloseWebUIResetBanner();
+ if (automatic_profile_resetter_)
+ automatic_profile_resetter_->NotifyDidCloseWebUIResetBanner();
}
void ResetProfileSettingsHandler::OnSettingsFetched() {