Skip to content

Commit

Permalink
chore: Avoid NRE in sample
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Oct 7, 2022
1 parent b7f1f4b commit 0011609
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void AddProperties(Package package)
{
SafeAdd("DisplayName", () => package.DisplayName);
SafeAdd("Description", () => package.Description);
SafeAdd("EffectiveExternalLocation", () => package.EffectiveExternalLocation.Path);
SafeAdd("EffectiveExternalLocation", () => package.EffectiveExternalLocation?.Path);
SafeAdd("EffectiveExternalPath", () => package.EffectiveExternalPath);
SafeAdd("EffectiveLocation", () => package.EffectiveLocation.Path);
SafeAdd("EffectivePath", () => package.EffectivePath);
Expand All @@ -40,12 +40,12 @@ public void AddProperties(Package package)
SafeAdd("IsResourcePackage", () => package.IsResourcePackage);
SafeAdd("IsStub", () => package.IsStub);
SafeAdd("Logo", () => package.Logo);
SafeAdd("MachineExternalLocation", () => package.MachineExternalLocation.Path);
SafeAdd("MachineExternalLocation", () => package.MachineExternalLocation?.Path);
SafeAdd("MachineExternalPath", () => package.MachineExternalPath);
SafeAdd("MutableLocation", () => package.MutableLocation);
SafeAdd("MutablePath", () => package.MutablePath);
SafeAdd("SignatureKind", () => package.SignatureKind);
SafeAdd("UserExternalLocation", () => package.UserExternalLocation.Path);
SafeAdd("UserExternalLocation", () => package.UserExternalLocation?.Path);
SafeAdd("UserExternalPath", () => package.UserExternalPath);
SafeAdd("Id.Architecture", () => package.Id.Architecture);
SafeAdd("Id.FamilyName", () => package.Id.FamilyName);
Expand Down

0 comments on commit 0011609

Please sign in to comment.