From d3da6fa1d0dd49ee553f1d4ae731f592bec13952 Mon Sep 17 00:00:00 2001 From: Werkezeugs <95657932+Werkezeugs@users.noreply.github.com> Date: Thu, 30 May 2024 20:27:19 +0200 Subject: [PATCH] Hotfix Add null check before using .Bind(serviceHub) to prevent crash on using .Include in ParseQueries with an anonym access --- Parse/Platform/Objects/ParseObjectClassController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Parse/Platform/Objects/ParseObjectClassController.cs b/Parse/Platform/Objects/ParseObjectClassController.cs index 13cf1b15..2f1f4ed5 100644 --- a/Parse/Platform/Objects/ParseObjectClassController.cs +++ b/Parse/Platform/Objects/ParseObjectClassController.cs @@ -112,6 +112,7 @@ public ParseObject Instantiate(string className, IServiceHub serviceHub) Classes.TryGetValue(className, out ParseObjectClass info); Mutex.ExitReadLock(); + serviceHub = serviceHub ?? ParseClient.Instance; return info is { } ? info.Instantiate().Bind(serviceHub) : new ParseObject(className, serviceHub); }