From 5ec653af2cc951d0cf02949ef46dd447e264fbb9 Mon Sep 17 00:00:00 2001 From: BDisp Date: Sun, 5 Mar 2023 19:29:05 +0000 Subject: [PATCH] Fix a dereference of a possibly null reference. --- Terminal.Gui/Configuration/Scope.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/Configuration/Scope.cs b/Terminal.Gui/Configuration/Scope.cs index 12eacf924..da4e5c43f 100644 --- a/Terminal.Gui/Configuration/Scope.cs +++ b/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 {