From 8b534bef9b5117b6e6cddd554e9fa2891ad61ffa Mon Sep 17 00:00:00 2001 From: Michael W Date: Sat, 18 Jun 2016 22:40:54 +0200 Subject: Eleven: fix possible NPE Fix for the case when name is null Change-Id: I90909497129c09f6ab8a4eebd0935c2d38de5b39 Reference: BugDump 13-20160610-16 L#80 --- src/com/cyanogenmod/eleven/locale/LocaleUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/cyanogenmod/eleven/locale/LocaleUtils.java b/src/com/cyanogenmod/eleven/locale/LocaleUtils.java index f16a17a..4381f71 100644 --- a/src/com/cyanogenmod/eleven/locale/LocaleUtils.java +++ b/src/com/cyanogenmod/eleven/locale/LocaleUtils.java @@ -127,6 +127,9 @@ public class LocaleUtils { * for the new # bucket, so the returned range becomes 0 to N+1. */ public int getBucketIndex(String name) { + if (name == null) { + return -1; + } boolean prefixIsNumeric = false; final int length = name.length(); int offset = 0; -- cgit v1.2.3