diff options
author | Xavier Ducrohet <xav@android.com> | 2011-02-06 10:42:55 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2011-02-06 10:43:07 -0800 |
commit | d675df4f88e99cffa3671bb8b4ac0ad3078ea05a (patch) | |
tree | 376b4b32fa3d9e42a466a9703601fe2a1a7f3115 /ide_common | |
parent | bd321b2fe454a600bcd6a162399086504e590a22 (diff) | |
download | sdk-d675df4f88e99cffa3671bb8b4ac0ad3078ea05a.zip sdk-d675df4f88e99cffa3671bb8b4ac0ad3078ea05a.tar.gz sdk-d675df4f88e99cffa3671bb8b4ac0ad3078ea05a.tar.bz2 |
Fix possible NPE in legacy callback support.
Change-Id: I5faa155393466e1bc4b2fc1e9417cde91a8be456
Diffstat (limited to 'ide_common')
-rw-r--r-- | ide_common/src/com/android/ide/common/rendering/legacy/LegacyCallback.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ide_common/src/com/android/ide/common/rendering/legacy/LegacyCallback.java b/ide_common/src/com/android/ide/common/rendering/legacy/LegacyCallback.java index f4bc15a..144a196 100644 --- a/ide_common/src/com/android/ide/common/rendering/legacy/LegacyCallback.java +++ b/ide_common/src/com/android/ide/common/rendering/legacy/LegacyCallback.java @@ -41,7 +41,11 @@ public abstract class LegacyCallback implements public final String[] resolveResourceValue(int id) { Pair<ResourceType, String> info = resolveResourceId(id); - return new String[] { info.getSecond(), info.getFirst().getName() }; + if (info != null) { + return new String[] { info.getSecond(), info.getFirst().getName() }; + } + + return null; } public final String resolveResourceValue(int[] id) { |