JAL-3997 check for tooltip being null before checking equivalence to last tooltip... bug/JAL-3997_NPE_in_wrapped_mode
authorJim Procter <j.procter@dundee.ac.uk>
Mon, 18 Apr 2022 13:49:47 +0000 (14:49 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Mon, 18 Apr 2022 13:49:47 +0000 (14:49 +0100)
src/jalview/gui/SeqPanel.java

index 54e3db7..111b4c0 100644 (file)
@@ -1184,7 +1184,8 @@ public class SeqPanel extends JPanel
 
     String tooltip = AnnotationPanel.buildToolTip(anns[rowIndex], column,
             anns);
-    if (!tooltip.equals(lastTooltip))
+    if (tooltip == null ? tooltip != lastTooltip
+            : !tooltip.equals(lastTooltip))
     {
       lastTooltip = tooltip;
       lastFormattedTooltip = tooltip == null ? null