diff options
-rw-r--r-- | wizards/com/sun/star/wizards/ui/ButtonList.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java b/wizards/com/sun/star/wizards/ui/ButtonList.java index 447a7d1325e4..522768bf8c07 100644 --- a/wizards/com/sun/star/wizards/ui/ButtonList.java +++ b/wizards/com/sun/star/wizards/ui/ButtonList.java @@ -464,14 +464,19 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener fireItemSelected(); } - /** * set the text under the button list */ private void refreshImageText() { + String sText; Object item = m_nCurrentSelection >= 0 ? getListModel().getElementAt(m_nCurrentSelection) : null; - final String sText = PropertyNames.SPACE + renderer.render(item); + if (item != null) { + sText = PropertyNames.SPACE + renderer.render(item); + } + else { + sText = ""; + } Helper.setUnoPropertyValue(getModel(lblImageText), PropertyNames.PROPERTY_LABEL, sText); } |