Fix needed for the new terminal test I previously checked in. It was crashing due to a NULL dereference.
llvm-svn: 225316
This commit is contained in:
parent
94c86e7226
commit
009597d048
|
@ -470,8 +470,12 @@ LaunchInNewTerminalWithAppleScript (const char *exe_path, ProcessLaunchInfo &lau
|
|||
// need to be sent to darwin-debug. If we send all environment entries, we might blow the
|
||||
// max command line length, so we only send user modified entries.
|
||||
const char **envp = launch_info.GetEnvironmentEntries().GetConstArgumentVector ();
|
||||
|
||||
StringList host_env;
|
||||
const size_t host_env_count = Host::GetEnvironment (host_env);
|
||||
|
||||
if (envp && envp[0])
|
||||
{
|
||||
const char *env_entry;
|
||||
for (size_t env_idx = 0; (env_entry = envp[env_idx]) != NULL; ++env_idx)
|
||||
{
|
||||
|
@ -490,6 +494,7 @@ LaunchInNewTerminalWithAppleScript (const char *exe_path, ProcessLaunchInfo &lau
|
|||
command.Printf(" --env='%s'", env_entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
command.PutCString(" -- ");
|
||||
|
||||
|
|
Loading…
Reference in New Issue