From cca4be19fec1615d94dc3d99df7924cb98d874b1 Mon Sep 17 00:00:00 2001
From: Phillipus
Date: Wed, 6 Nov 2024 07:39:49 +0000
Subject: [PATCH] Add null check guard
- A case reported on the forum of getGraphicalViewer() returning null
---
.../com/archimatetool/editor/diagram/AbstractDiagramEditor.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/AbstractDiagramEditor.java b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/AbstractDiagramEditor.java
index 46d40de19..b17b5f8fc 100644
--- a/com.archimatetool.editor/src/com/archimatetool/editor/diagram/AbstractDiagramEditor.java
+++ b/com.archimatetool.editor/src/com/archimatetool/editor/diagram/AbstractDiagramEditor.java
@@ -966,7 +966,7 @@ public void deactivateContext() {
@Override
public void selectObjects(Object[] objects) {
// Safety check in case this is called via Display#asyncExec()
- if(getGraphicalViewer().getControl() == null) {
+ if(getGraphicalViewer() == null || getGraphicalViewer().getControl() == null) {
return;
}