summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-11-16 14:35:43 +0800
committerWu-cheng Li <wuchengli@google.com>2011-11-16 14:35:43 +0800
commit77665404048135a5a96d709378d6f55518b868e2 (patch)
tree428b7549f968ca5dd886d7ab1880ba5cc7e62aaa /src/com/android/camera
parent948e75e8e3fd2ec98a08e65efdb6e5eb6d02c33b (diff)
downloadLegacyCamera-77665404048135a5a96d709378d6f55518b868e2.zip
LegacyCamera-77665404048135a5a96d709378d6f55518b868e2.tar.gz
LegacyCamera-77665404048135a5a96d709378d6f55518b868e2.tar.bz2
Fix NPE if the device has only one camera.
bug:5620872 Change-Id: I4ee2aa85e73c53d6a72f0839ed3bf31bc14c586e
Diffstat (limited to 'src/com/android/camera')
-rw-r--r--src/com/android/camera/ui/IndicatorControlBar.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/camera/ui/IndicatorControlBar.java b/src/com/android/camera/ui/IndicatorControlBar.java
index 197c594..615a5ba 100644
--- a/src/com/android/camera/ui/IndicatorControlBar.java
+++ b/src/com/android/camera/ui/IndicatorControlBar.java
@@ -57,7 +57,9 @@ public class IndicatorControlBar extends IndicatorControl implements
// Add CameraPicker control.
initializeCameraPicker();
- mCameraPicker.setBackgroundResource(R.drawable.bg_pressed);
+ if (mCameraPicker != null) {
+ mCameraPicker.setBackgroundResource(R.drawable.bg_pressed);
+ }
// Add the ZoomControl if supported.
if (zoomSupported) {