From cfccf5e90d27bd49df69eb9826848cad5b50e88d Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 29 Dec 2015 10:32:54 +0100 Subject: handle null names in getColorForName --- src/main/java/eu/siacs/conversations/utils/UIHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') 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, -- cgit v1.2.3