From 27d37e55f474b2705af295429a8aee466900d1ed Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Wed, 15 Jun 2022 16:24:46 +0100 Subject: [PATCH] prevent NPE --- gui/src/main/groovy/com/muwire/gui/TrustCellRenderer.groovy | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gui/src/main/groovy/com/muwire/gui/TrustCellRenderer.groovy b/gui/src/main/groovy/com/muwire/gui/TrustCellRenderer.groovy index 7f95b3bd9..35f5c6c63 100644 --- a/gui/src/main/groovy/com/muwire/gui/TrustCellRenderer.groovy +++ b/gui/src/main/groovy/com/muwire/gui/TrustCellRenderer.groovy @@ -24,6 +24,9 @@ class TrustCellRenderer extends DefaultTableCellRenderer { Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column) + + if (value == null) + return this // TODO: investigate TrustLevel level = (TrustLevel) value switch(value) {