From 39f46836d17a394a255b0fe730d8b57c2fb5df31 Mon Sep 17 00:00:00 2001 From: Matheos Mattsson <32064310+Matheos96@users.noreply.github.com> Date: Mon, 16 Jun 2025 17:28:28 +0300 Subject: [PATCH] Handle case where IPostDataElement.Bytes is null --- CefSharp/PostDataExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CefSharp/PostDataExtensions.cs b/CefSharp/PostDataExtensions.cs index 03a6d07765..3cdaa6e631 100644 --- a/CefSharp/PostDataExtensions.cs +++ b/CefSharp/PostDataExtensions.cs @@ -81,7 +81,7 @@ public static string GetCharSet(this IRequest request) public static string GetBody(this IPostDataElement postDataElement, string charSet = null) { var bytes = postDataElement.Bytes; - if (bytes.Length == 0) + if (bytes is null || bytes.Length == 0) { return null; }