From cc92f486caba9fffa7c33d6dc47894206cea15e5 Mon Sep 17 00:00:00 2001 From: Matthias Ronge Date: Wed, 6 Mar 2024 14:48:15 +0100 Subject: [PATCH] Fix IllegalStateException: No logical node selected! --- .../production/services/dataeditor/DataEditorService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kitodo/src/main/java/org/kitodo/production/services/dataeditor/DataEditorService.java b/Kitodo/src/main/java/org/kitodo/production/services/dataeditor/DataEditorService.java index 3824f994d07..a8fb3d9ba73 100644 --- a/Kitodo/src/main/java/org/kitodo/production/services/dataeditor/DataEditorService.java +++ b/Kitodo/src/main/java/org/kitodo/production/services/dataeditor/DataEditorService.java @@ -255,7 +255,7 @@ public static StructuralElementViewInterface getStructuralElementView(DataEditor TreeNode selectedLogicalNode = dataEditor.getStructurePanel().getSelectedLogicalNode(); if (Objects.isNull(selectedLogicalNode)) { - throw new IllegalStateException("No logical node selected!"); + return null; } if (!(selectedLogicalNode.getData() instanceof StructureTreeNode)) {