From b2195148a2d6a08f9c779487223097c0715cfa0b Mon Sep 17 00:00:00 2001 From: Qstick Date: Mon, 20 Dec 2021 20:38:16 -0600 Subject: [PATCH] Fixed: NullRef in SchemaBuilder when sending payload without optional Provider.Settings fields --- src/Radarr.Http/ClientSchema/SchemaBuilder.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Radarr.Http/ClientSchema/SchemaBuilder.cs b/src/Radarr.Http/ClientSchema/SchemaBuilder.cs index a2083034d..3a7c990ac 100644 --- a/src/Radarr.Http/ClientSchema/SchemaBuilder.cs +++ b/src/Radarr.Http/ClientSchema/SchemaBuilder.cs @@ -47,7 +47,10 @@ namespace Radarr.Http.ClientSchema var propertyType = mapping.PropertyType; var field = fields.Find(f => f.Name == mapping.Field.Name); - mapping.SetterFunc(target, field.Value); + if (field != null) + { + mapping.SetterFunc(target, field.Value); + } } return target;