aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-12-29 10:32:54 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-12-29 10:32:54 +0100
commitcfccf5e90d27bd49df69eb9826848cad5b50e88d (patch)
tree67c177ff00cae6ceb63882fd65f6c2c880d4ae0b /src/main
parent7bb67ee6605fbf3785782cf70d30fac4192d049b (diff)
handle null names in getColorForName
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/UIHelper.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
index cac23f07..cf1e0d3b 100644
--- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
@@ -131,7 +131,7 @@ public class UIHelper {
}
public static int getColorForName(String name) {
- if (name.isEmpty()) {
+ if (name == null || name.isEmpty()) {
return 0xFF202020;
}
int colors[] = {0xFFe91e63, 0xFF9c27b0, 0xFF673ab7, 0xFF3f51b5,