Index: chrome/browser/ui/views/app_list/app_list_controller_win.cc |
diff --git a/chrome/browser/ui/views/app_list/app_list_controller_win.cc b/chrome/browser/ui/views/app_list/app_list_controller_win.cc |
index 91eb041e184110bcafb18c7ea379b33713e45f04..8ccb9e0079828388c2ab12770793a0d327f73534 100644 |
--- a/chrome/browser/ui/views/app_list/app_list_controller_win.cc |
+++ b/chrome/browser/ui/views/app_list/app_list_controller_win.cc |
@@ -89,7 +89,12 @@ const int kAppListIconIndex = 1; |
CommandLine GetAppListCommandLine() { |
const char* const kSwitchesToCopy[] = { switches::kUserDataDir }; |
CommandLine* current = CommandLine::ForCurrentProcess(); |
- CommandLine command_line(current->GetProgram()); |
+ base::FilePath chrome_exe; |
+ if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { |
+ NOTREACHED(); |
+ return CommandLine(CommandLine::NO_PROGRAM); |
+ } |
+ CommandLine command_line(chrome_exe); |
command_line.CopySwitchesFrom(*current, kSwitchesToCopy, |
arraysize(kSwitchesToCopy)); |
command_line.AppendSwitch(switches::kShowAppList); |