Skip to content

Commit

Permalink
Use TryAdd
Browse files Browse the repository at this point in the history
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
  • Loading branch information
lamont-granquist committed Nov 1, 2023
1 parent a060fd7 commit dad84bf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions MechJeb2/VesselState.cs
Expand Up @@ -1139,8 +1139,7 @@ private void AnalyzeParts(Vessel vessel, EngineInfo einfo, IntakeInfo iinfo)
{
var moduleEngines = pm as ModuleEngines;

if (!engines.ContainsKey(moduleEngines))
engines.Add(moduleEngines, null);
engines.TryAdd(moduleEngines, null);
}
else if (pm is ModuleResourceIntake)
{
Expand Down

0 comments on commit dad84bf

Please sign in to comment.