From b2422ff55ca09e633abd8f9509b332ad74753088 Mon Sep 17 00:00:00 2001 From: althafvly Date: Thu, 25 May 2023 15:29:35 +0530 Subject: [PATCH] Gallery2: Check for null on menuItem update --- src/com/android/gallery3d/app/AlbumPage.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/android/gallery3d/app/AlbumPage.java b/src/com/android/gallery3d/app/AlbumPage.java index d997f34c2..257754525 100644 --- a/src/com/android/gallery3d/app/AlbumPage.java +++ b/src/com/android/gallery3d/app/AlbumPage.java @@ -803,8 +803,9 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster } private void updateMenuItem() { - if (allVideoFiles() && !mGetContent) { - mActionMenu.findItem(R.id.action_slideshow).setVisible(false); + MenuItem actionMenu = mActionMenu.findItem(R.id.action_slideshow); + if (allVideoFiles() && !mGetContent && actionMenu != null) { + actionMenu.setVisible(false); } } -- GitLab