summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-07-25 10:20:19 -0700
committerBobby Georgescu <georgescu@google.com>2012-07-25 10:20:19 -0700
commitd840343eb85f99131b61b5dc59cf6cb939cf8d95 (patch)
tree97eb6129cce6afc8cc2938806e62e5d6deaa657a /src
parentb133af5904c7f0ad5686d78f2c2b464454e3876c (diff)
downloadandroid_packages_apps_Snap-d840343eb85f99131b61b5dc59cf6cb939cf8d95.tar.gz
android_packages_apps_Snap-d840343eb85f99131b61b5dc59cf6cb939cf8d95.tar.bz2
android_packages_apps_Snap-d840343eb85f99131b61b5dc59cf6cb939cf8d95.zip
Fix for monkey-generated NPE in PhotoView from bug 6848371
In other parts of the code, there are checks for getGLRoot returning null, and one was missing here. Bug: 6848371 Change-Id: I3a7a1e1ea9847a43f4791de84f5f70cc27d53a1a
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/ui/PhotoView.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java
index e44905dbf..25254338a 100644
--- a/src/com/android/gallery3d/ui/PhotoView.java
+++ b/src/com/android/gallery3d/ui/PhotoView.java
@@ -1565,6 +1565,7 @@ public class PhotoView extends GLView {
public boolean switchWithCaptureAnimation(int offset) {
GLRoot root = getGLRoot();
+ if(root == null) return false;
root.lockRenderThread();
try {
return switchWithCaptureAnimationLocked(offset);