Skip to content

Commit

Permalink
Add additional null checks in JSONConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
Deadpikle committed Jun 4, 2023
1 parent 5212cd2 commit c748174
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NetSparkle/Configurations/JSONConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ public virtual string GetSavePath()
else
{

if (string.IsNullOrEmpty(AssemblyAccessor.AssemblyCompany) || string.IsNullOrEmpty(AssemblyAccessor.AssemblyProduct))
if (string.IsNullOrEmpty(AssemblyAccessor?.AssemblyCompany) || string.IsNullOrEmpty(AssemblyAccessor?.AssemblyProduct))
{
throw new NetSparkleException("Error: NetSparkleUpdater is missing the company or product name tag in the assembly accessor ("
+ AssemblyAccessor.GetType() + ")");
+ (AssemblyAccessor?.GetType().ToString() ?? "[null]") + ")");
}
var applicationFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData, Environment.SpecialFolderOption.DoNotVerify);
var saveFolder = Path.Combine(applicationFolder, AssemblyAccessor.AssemblyCompany, AssemblyAccessor.AssemblyProduct, "NetSparkleUpdater");
Expand Down

0 comments on commit c748174

Please sign in to comment.