mirror of https://github.com/zlatinb/muwire
Do not throw if rendering null values. Not clear how they get in the list yet
parent
e5ad1f7ca6
commit
af21cae225
|
@ -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 = "<html>" + PersonaCellRenderer.htmlize(value.getPersona()) + "</html>"
|
||||
|
|
Loading…
Reference in New Issue