]> gerrit.simantics Code Review - simantics/district.git/commitdiff
Fixed NPE, labels == null 74/3574/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 20 Nov 2019 11:15:26 +0000 (13:15 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 20 Nov 2019 11:16:21 +0000 (11:16 +0000)
gitlab #44

Change-Id: Ia85281ec70b75b1a5808a80cb0f5a7c00b4317b3
(cherry picked from commit 25f87bcfe45d3b94d745ae3a02386cd041dd790d)

org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkHoverInfoNode.java

index f263dc2216383bf90c0f5c223982d6deaf787453..316370bd2911042683593fb0a1950825517c5859 100644 (file)
@@ -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();