commit | 211938b91347513a35552b69fa825a5f43e2cd77 | [log] [tgz] |
---|---|---|
author | xulei <xulei@thundersoft.com> | Thu Jul 16 13:53:40 2015 +0800 |
committer | xulei <xulei@thundersoft.com> | Thu Jul 16 13:53:40 2015 +0800 |
tree | f16b5389ec50a16434683d0b38a345eebdda5791 | |
parent | a69026428f2e8bc8c85693c2b665cdad1e4d2b8f [diff] |
FP2-919: "Unfortunately,Gallery has stopped"pops up in the Gallery when execute resetHistory(),sometimes mMasterImage will be null.if mMasterImage is null,may lead to java.lang.NullPointerException Change-Id: I7cda813090f2d9670edafb0624b439e52ec1c98f
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java index 7bef513..bc6c51c 100644 --- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java +++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -1295,6 +1295,9 @@ } void resetHistory() { + if (mMasterImage == null) { + return; + } HistoryManager adapter = mMasterImage.getHistory(); adapter.reset(); HistoryItem historyItem = adapter.getItem(0);