Pārlūkot izejas kodu

Fix a dereference of a possibly null reference.

BDisp 2 gadi atpakaļ
vecāks
revīzija
5ec653af2c
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      Terminal.Gui/Configuration/Scope.cs

+ 1 - 1
Terminal.Gui/Configuration/Scope.cs

@@ -132,7 +132,7 @@ namespace Terminal.Gui.Configuration {
 							try {
 								scope! [propertyName].PropertyValue = readHelper?.Read (ref reader, propertyType!, options);
 							} catch (NotSupportedException e) {
-								throw new JsonException ($"Error reading property \"{propertyName}\" of type \"{propertyType.Name}\".", e);
+								throw new JsonException ($"Error reading property \"{propertyName}\" of type \"{propertyType?.Name}\".", e);
 							}
 						} else {
 							try {