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

Unified Diff: chrome/browser/ui/webui/options/create_profile_handler.cc

Issue 405883003: Fix a null pointer dereference in CreateProfileHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment Created 6 years, 5 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/ui/webui/options/create_profile_handler.cc
diff --git a/chrome/browser/ui/webui/options/create_profile_handler.cc b/chrome/browser/ui/webui/options/create_profile_handler.cc
index facc7f0054b23dbd8c8708035b146d20d17f8294..05a25877802d504d12171780768686dee7022f9d 100644
--- a/chrome/browser/ui/webui/options/create_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/create_profile_handler.cc
@@ -283,7 +283,9 @@ void CreateProfileHandler::ShowProfileCreationError(
web_ui()->CallJavascriptFunction(
GetJavascriptMethodName(PROFILE_CREATION_ERROR),
base::StringValue(error));
- helper::DeleteProfileAtPath(profile->GetPath(), web_ui());
+ // The ProfileManager calls us back with a NULL profile in some cases.
+ if (profile)
+ helper::DeleteProfileAtPath(profile->GetPath(), web_ui());
}
void CreateProfileHandler::ShowProfileCreationWarning(
« 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