From 3cd2b4487a61f05b02005d3588bc84c5e562adab Mon Sep 17 00:00:00 2001 From: Werkezeugs <95657932+Werkezeugs@users.noreply.github.com> Date: Sat, 25 May 2024 11:29:36 +0200 Subject: [PATCH] Update ParseObject.cs Hotfix crash for anonym User when using ParseQuery.Include() For anonym users currently the project crashes with "Object reference not set to an Instance of an object" + this only happens if you use a ParseQuery with the .Include("") Keyword + Rootcause is serviceHub is null here --> cannot accesss the (serviceHub).Instance --- Parse/Platform/Objects/ParseObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parse/Platform/Objects/ParseObject.cs b/Parse/Platform/Objects/ParseObject.cs index 25768796..8d37dd6b 100644 --- a/Parse/Platform/Objects/ParseObject.cs +++ b/Parse/Platform/Objects/ParseObject.cs @@ -113,7 +113,7 @@ protected ParseObject(IServiceHub serviceHub = default) : this(AutoClassName, se /// /// The serviceHub to use for all operations. /// The instance which was mutated. - public ParseObject Bind(IServiceHub serviceHub) => (Instance: this, Services = serviceHub).Instance; + public ParseObject Bind(IServiceHub serviceHub) => (Instance: this, Services = ParseClient.Instance).Instance; /// /// Occurs when a property value changes.