summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngus Kong <shkong@google.com>2011-11-04 15:23:49 +0800
committerAngus Kong <shkong@google.com>2011-11-08 11:45:00 +0800
commited92afa6dfae5712c12f63d197b5239c55ce07a6 (patch)
treeb6cbe16b4c4bbde60c7a45ae51d9868be9465422
parent08ce47f0a87dac202bfe3b97a12d1d059a3c88f6 (diff)
downloadLegacyCamera-ed92afa6dfae5712c12f63d197b5239c55ce07a6.zip
LegacyCamera-ed92afa6dfae5712c12f63d197b5239c55ce07a6.tar.gz
LegacyCamera-ed92afa6dfae5712c12f63d197b5239c55ce07a6.tar.bz2
Fix NPE when returned child is null.
bug: 5563072 Change-Id: I26ffe581b07c2a28da2c249bea2b913e64b3481f
-rw-r--r--src/com/android/camera/ui/SecondLevelIndicatorControlBar.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/ui/SecondLevelIndicatorControlBar.java b/src/com/android/camera/ui/SecondLevelIndicatorControlBar.java
index fbf1585..446f8be 100644
--- a/src/com/android/camera/ui/SecondLevelIndicatorControlBar.java
+++ b/src/com/android/camera/ui/SecondLevelIndicatorControlBar.java
@@ -110,8 +110,8 @@ public class SecondLevelIndicatorControlBar extends IndicatorControl implements
if (y >= getHeight()) y = getHeight() - 1;
int index = getTouchViewIndex((int) x, width);
- if (index == -1) return true;
View b = getChildAt(index);
+ if (b == null) return true;
dispatchRelativeTouchEvent(b, event);
if ((mSelectedIndex != -1) && (index != mSelectedIndex)) {
View v = getChildAt(mSelectedIndex);