diff --git a/gui/src/main/groovy/com/muwire/gui/contacts/PersonaOrProfileListCellRenderer.groovy b/gui/src/main/groovy/com/muwire/gui/contacts/PersonaOrProfileListCellRenderer.groovy index 6afbdb34..5a29797d 100644 --- a/gui/src/main/groovy/com/muwire/gui/contacts/PersonaOrProfileListCellRenderer.groovy +++ b/gui/src/main/groovy/com/muwire/gui/contacts/PersonaOrProfileListCellRenderer.groovy @@ -23,9 +23,15 @@ class PersonaOrProfileListCellRenderer extends DefaultListCellRenderer { @Override Component getListCellRendererComponent(JList list, Object v, int index, boolean isSelected, boolean cellHasFocus) { + if (v == null) + return this + super.getListCellRendererComponent(list, v, index, isSelected, cellHasFocus) PersonaOrProfile value = (PersonaOrProfile)v + if (value.getPersona() == null) + return this + String text if (settings.personaRendererIds) text = "" + PersonaCellRenderer.htmlize(value.getPersona()) + ""