Skip to content

Commit c748174

Browse files
committed
Add additional null checks in JSONConfiguration
1 parent 5212cd2 commit c748174

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NetSparkle/Configurations/JSONConfiguration.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ public virtual string GetSavePath()
110110
else
111111
{
112112

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

0 commit comments

Comments
 (0)