Skip to content

Commit

Permalink
Merge pull request #1197 from microsoft/main
Browse files Browse the repository at this point in the history
fixed null bug, added null check (#1196)
  • Loading branch information
WardenGnaw authored Aug 13, 2021
2 parents 9e738ca + d7d2c7e commit 74a8c44
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,11 @@ private async Task<List<LaunchCommand>> GetInitializeCommands()
commands.Add(new LaunchCommand("-target-attach " + _launchOptions.ProcessId.Value.ToString(CultureInfo.InvariantCulture), ignoreFailures: false, failureHandler: failureHandler));
}

commands.AddRange(_launchOptions.PostRemoteConnectCommands);
if (_launchOptions.PostRemoteConnectCommands != null)
{
commands.AddRange(_launchOptions.PostRemoteConnectCommands);
}


if (this.MICommandFactory.Mode == MIMode.Lldb)
{
Expand Down Expand Up @@ -832,7 +836,11 @@ private async Task<List<LaunchCommand>> GetInitializeCommands()
}

}
commands.AddRange(_launchOptions.PostRemoteConnectCommands);

if (_launchOptions.PostRemoteConnectCommands != null)
{
commands.AddRange(_launchOptions.PostRemoteConnectCommands);
}

// Environment variables are set for the debuggee only with the modes that support that
foreach (EnvironmentEntry envEntry in _launchOptions.Environment)
Expand Down

0 comments on commit 74a8c44

Please sign in to comment.