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( |