Fix one nullability issue

This commit is contained in:
Matt Nadareski
2023-09-13 22:40:00 -04:00
parent a9792fdff1
commit 410b2bef2b

View File

@@ -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})");