From fdef9356b9ba483e437fbc3a2bc0b6aaf3c05c29 Mon Sep 17 00:00:00 2001 From: Stepan Goremykin Date: Sun, 8 Oct 2023 01:25:37 +0200 Subject: Use null propagation --- RSSDP/HttpResponseParser.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'RSSDP/HttpResponseParser.cs') diff --git a/RSSDP/HttpResponseParser.cs b/RSSDP/HttpResponseParser.cs index 71b7a7b99..c570c84cb 100644 --- a/RSSDP/HttpResponseParser.cs +++ b/RSSDP/HttpResponseParser.cs @@ -33,10 +33,7 @@ namespace Rssdp.Infrastructure } catch { - if (retVal != null) - { - retVal.Dispose(); - } + retVal?.Dispose(); throw; } -- cgit v1.2.3