From: Tuukka Lehtonen Date: Wed, 20 Nov 2019 11:15:26 +0000 (+0200) Subject: Fixed NPE, labels == null X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=25f87bcfe45d3b94d745ae3a02386cd041dd790d;p=simantics%2Fdistrict.git Fixed NPE, labels == null gitlab #44 Change-Id: Ia85281ec70b75b1a5808a80cb0f5a7c00b4317b3 --- diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkHoverInfoNode.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkHoverInfoNode.java index f263dc22..316370bd 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkHoverInfoNode.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkHoverInfoNode.java @@ -67,7 +67,7 @@ public class DistrictNetworkHoverInfoNode extends G2DNode implements HoverSensit public void renderDeferred(Graphics2D g) { if (!hover || activeNode.get() == null) return; - if (labels.isEmpty() || mousePosition == null) + if (labels == null || labels.isEmpty() || mousePosition == null) return; AffineTransform ot = g.getTransform(); Font of = g.getFont();