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
commit14ce29ab5608daaa3d0074cdfc9fc85988537ff2 (patch)
tree00d56733dc17f8f628517be188b76c060ead5144 /src
parent52dfb17e3c93b3762130ec8912c6e16c9dea0edc (diff)
downloadandroid_packages_apps_Gallery2-14ce29ab5608daaa3d0074cdfc9fc85988537ff2.tar.gz
android_packages_apps_Gallery2-14ce29ab5608daaa3d0074cdfc9fc85988537ff2.tar.bz2
android_packages_apps_Gallery2-14ce29ab5608daaa3d0074cdfc9fc85988537ff2.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);