diff --git a/csharp/App/Backend/DataTypes/Methods/Session.cs b/csharp/App/Backend/DataTypes/Methods/Session.cs index 4856816cd..2c259ffc9 100644 --- a/csharp/App/Backend/DataTypes/Methods/Session.cs +++ b/csharp/App/Backend/DataTypes/Methods/Session.cs @@ -55,10 +55,9 @@ public static class SessionMethods var installation = Db.GetInstallationById(installationId); var parent = Db.GetFolderById(parentId); - if(installation.ParentId == parentId) return false; + if(installation == null || installation.ParentId == parentId) return false; return user is not null - && installation is not null && user.HasWriteAccess && user.HasAccessTo(installation) && user.HasAccessTo(parent)