diff --git a/Neos.Media.Browser/Classes/Controller/UsageController.php b/Neos.Media.Browser/Classes/Controller/UsageController.php index b7aa945742..e1ff71bd6a 100644 --- a/Neos.Media.Browser/Classes/Controller/UsageController.php +++ b/Neos.Media.Browser/Classes/Controller/UsageController.php @@ -128,7 +128,7 @@ public function relatedNodesAction(AssetInterface $asset) $workspacePermissions = $this->contentRepositoryAuthorizationService->getWorkspacePermissions($currentContentRepositoryId, $usage->getWorkspaceName(), $this->securityContext->getRoles(), $this->userService->getBackendUser()?->getId()); $workspace = $contentRepository->findWorkspaceByName($usage->getWorkspaceName()); - $inaccessibleRelation['label'] = $this->getLabelForInaccessibleWorkspace($workspace); + $inaccessibleRelation['label'] = $workspace && $this->getLabelForInaccessibleWorkspace($workspace); $inaccessibleRelation['nodeIdentifier'] = $usage->getNodeAggregateId()->value; $inaccessibleRelation['workspaceName'] = $usage->getWorkspaceName()->value; $inaccessibleRelation['workspace'] = $workspace;