aboutsummaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
authorIngo Bauersachs <ingo@jitsi.org>2014-01-12 19:35:27 +0100
committerIngo Bauersachs <ingo@jitsi.org>2014-01-12 19:35:27 +0100
commitecd508088e650093a7abe837e6f7223448f52b7c (patch)
tree73aa6a66770c159280b11c3bdd5cb00557cc1593 /src/net
parent09c0ef620b050e601cdc75c13bc7d54a2d7cc335 (diff)
downloadjitsi-ecd508088e650093a7abe837e6f7223448f52b7c.zip
jitsi-ecd508088e650093a7abe837e6f7223448f52b7c.tar.gz
jitsi-ecd508088e650093a7abe837e6f7223448f52b7c.tar.bz2
Fix NPE on Mac
Diffstat (limited to 'src/net')
-rw-r--r--src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationPanel.java25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationPanel.java b/src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationPanel.java
index 56e5c70..15a9b12 100644
--- a/src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationPanel.java
+++ b/src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationPanel.java
@@ -663,6 +663,7 @@ public class GeneralConfigurationPanel
* 3-column layout to show the language in the current locale, the
* locale of the language itself and the percentage of translation.
*/
+ @SuppressWarnings("serial")
private static class LanguageDropDownRenderer
extends JPanel
implements ListCellRenderer
@@ -685,13 +686,23 @@ public class GeneralConfigurationPanel
int index, boolean isSelected, boolean cellHasFocus)
{
LocaleItem lm = (LocaleItem)value;
- labels[0].setText(lm.locale.getDisplayLanguage());
- labels[1].setText(lm.locale.getDisplayLanguage(lm.locale));
- labels[2].setText(Resources.getString(
- "plugin.generalconfig.DEFAULT_LANGUAGE_TRANSLATED",
- new String[]{
- Integer.toString(lm.translated)
- }));
+ if (value != null)
+ {
+ labels[0].setText(lm.locale.getDisplayLanguage());
+ labels[1].setText(lm.locale.getDisplayLanguage(lm.locale));
+ labels[2].setText(Resources.getString(
+ "plugin.generalconfig.DEFAULT_LANGUAGE_TRANSLATED",
+ new String[]{
+ Integer.toString(lm.translated)
+ }));
+ }
+ else
+ {
+ labels[0].setText("");
+ labels[1].setText("");
+ labels[2].setText("");
+ }
+
this.setBackground(isSelected
? list.getSelectionBackground()
: list.getBackground());