From ecb670a2d91b6f873bb6acfc7d39e02dc1047e71 Mon Sep 17 00:00:00 2001 From: Kenneth Hsu Date: Sun, 7 Oct 2018 09:59:13 -0700 Subject: [PATCH] Avoid potential comparison of value type with null. While there aren't currently any cases where the generic type is a value type, this will make the code slightly more robust to future implementations. --- Duplicati/Library/Backend/OneDrive/MicrosoftGraphBackend.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Duplicati/Library/Backend/OneDrive/MicrosoftGraphBackend.cs b/Duplicati/Library/Backend/OneDrive/MicrosoftGraphBackend.cs index 6bcce528a..b688fa339 100644 --- a/Duplicati/Library/Backend/OneDrive/MicrosoftGraphBackend.cs +++ b/Duplicati/Library/Backend/OneDrive/MicrosoftGraphBackend.cs @@ -498,7 +498,7 @@ namespace Duplicati.Library.Backend private T SendRequest(HttpMethod method, string url, T body) { var request = new HttpRequestMessage(method, url); - if (body != null) + if (!Object.Equals(body, default(T))) { request.Content = this.PrepareContent(body); }