From 410b2bef2b3dbbcae830439291d0f4a0637fe3a7 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 13 Sep 2023 22:40:00 -0400 Subject: [PATCH] Fix one nullability issue --- BinaryObjectScanner.Printing/InstallShieldCabinet.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BinaryObjectScanner.Printing/InstallShieldCabinet.cs b/BinaryObjectScanner.Printing/InstallShieldCabinet.cs index 8804ecc7..cbdaa034 100644 --- a/BinaryObjectScanner.Printing/InstallShieldCabinet.cs +++ b/BinaryObjectScanner.Printing/InstallShieldCabinet.cs @@ -140,6 +140,13 @@ namespace BinaryObjectScanner.Printing { builder.AppendLine(" Descriptor Information:"); builder.AppendLine(" -------------------------"); + if (descriptor == null) + { + builder.AppendLine(" No descriptor"); + builder.AppendLine(); + return; + } + builder.AppendLine($" Strings offset: {descriptor.StringsOffset} (0x{descriptor.StringsOffset:X})"); builder.AppendLine($" Reserved 0: {(descriptor.Reserved0 == null ? "[NULL]" : BitConverter.ToString(descriptor.Reserved0).Replace('-', ' '))}"); builder.AppendLine($" Component list offset: {descriptor.ComponentListOffset} (0x{descriptor.ComponentListOffset:X})");