Skip to content

Commit

Permalink
Use Version.TryParse
Browse files Browse the repository at this point in the history
  • Loading branch information
jstedfast committed Oct 9, 2018
1 parent 62cdeac commit 61e811c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Xamarin.MacDev/MonoTouchSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,13 @@ static string GetPlatformKey (PlatformName platform)

public Version RecommendedXcodeVersion {
get {
PString version;
Version version;
PString value;

if (!versions.TryGetValue ("RecommendedXcodeVersion", out version))
if (!versions.TryGetValue ("RecommendedXcodeVersion", out value) || !System.Version.TryParse (value.Value, out version))
return new Version (8, 0);

return System.Version.Parse (version.Value);
return version;
}
}

Expand Down

0 comments on commit 61e811c

Please sign in to comment.