Skip to content

Commit

Permalink
Merge pull request #1765 from sibille/dev
Browse files Browse the repository at this point in the history
Ensure config is not null in version checks
  • Loading branch information
sibille authored Jan 29, 2018
2 parents 043ee49 + c3245fa commit 7ad5905
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/src/Core/Locations/TemplatesContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public bool IsNewVersionAvailable(out Version version)
version = null;
if (Current != null)
{
var result = !Current.Version.IsNull() && Current.Version < Source.Config.ResolvePackage(WizardVersion)?.Version;
var result = !Current.Version.IsNull() && Current.Version < Source.Config?.ResolvePackage(WizardVersion)?.Version;
if (result == true)
{
version = Source.Config.ResolvePackage(WizardVersion)?.Version;
Expand All @@ -91,7 +91,7 @@ public bool IsWizardUpdateAvailable(out Version version)

if (Current != null)
{
var result = !Current.Version.IsNull() && (Current.Version.Major < Source.Config.Latest.Version.Major || Current.Version.Minor < Source.Config.Latest.Version.Minor);
var result = !Current.Version.IsNull() && (Current.Version.Major < Source.Config?.Latest.Version.Major || Current.Version.Minor < Source.Config?.Latest.Version.Minor);
if (result == true)
{
version = new Version(Source.Config.Latest.Version.Major, Source.Config.Latest.Version.Minor);
Expand Down

0 comments on commit 7ad5905

Please sign in to comment.