diff options
| author | Kedi Xu <kedix@codeaurora.org> | 2016-09-02 14:05:18 +0800 |
|---|---|---|
| committer | Kedi Xu <kedix@codeaurora.org> | 2016-09-07 19:39:57 +0800 |
| commit | 6948304f6919e81b75b5a1fa9f86d783e9fb87dd (patch) | |
| tree | f952ba0d20f5cf9c8342ea3eea67e1d73663ea39 /src | |
| parent | 48ae92db0c1eb27629056e1db9088069f3945b2a (diff) | |
| download | android_packages_apps_Gallery2-6948304f6919e81b75b5a1fa9f86d783e9fb87dd.tar.gz android_packages_apps_Gallery2-6948304f6919e81b75b5a1fa9f86d783e9fb87dd.tar.bz2 android_packages_apps_Gallery2-6948304f6919e81b75b5a1fa9f86d783e9fb87dd.zip | |
SnapdragonGallery: Fix crash mModel is null in monkeytest
Check mModel isn't null before use.
Change-Id: I5e0edecf18561f90d913844b44a314c79b2b66fe
CRs-Fixed: 1062647
Diffstat (limited to 'src')
| -rwxr-xr-x | src/com/android/gallery3d/app/PhotoPage.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index fdcb573bb..3000d056b 100755 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -1415,7 +1415,9 @@ public abstract class PhotoPage extends ActivityState implements mActivity.getStateManager().startState(SinglePhotoPage.class, data); return; } - mModel.setCurrentPhoto(path, mCurrentIndex); + if (null != mModel) { + mModel.setCurrentPhoto(path, mCurrentIndex); + } } } |
