From 0b15965e2fe7ee3c2ac01ab05f91745aa9366621 Mon Sep 17 00:00:00 2001 From: Niklas Rentz <47597619+NiklasRentzCAU@users.noreply.github.com> Date: Mon, 16 Aug 2021 09:14:19 +0200 Subject: [PATCH] klighd: fixed NPE for labels with only a KText and no direct label text (#94) --- .../internal/macrolayout/KlighdDiagramLayoutConnector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/internal/macrolayout/KlighdDiagramLayoutConnector.java b/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/internal/macrolayout/KlighdDiagramLayoutConnector.java index 52ddf49de..3c88e0a69 100644 --- a/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/internal/macrolayout/KlighdDiagramLayoutConnector.java +++ b/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/internal/macrolayout/KlighdDiagramLayoutConnector.java @@ -743,7 +743,7 @@ public Boolean caseElkLabel(final ElkLabel layoutLabel) { layoutLabel.getText()); String origLabelText = label.getText(); - if (origLabelText.equals(layoutLabel.getText())) { + if (origLabelText != null && origLabelText.equals(layoutLabel.getText())) { label.setProperty(KlighdProperties.TOOLTIP, null); } else { label.setProperty(KlighdProperties.TOOLTIP, origLabelText);