diff --git a/TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java b/TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java index 7ee8af56a..61dbb0aab 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java @@ -13622,7 +13622,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat } CharSequence subtitle = null; TLRPC.Photo avatar = avatarsArr.get(switchingToIndex); - if (avatar.date != 0) { + if (avatar != null && avatar.date != 0) { subtitle = LocaleController.formatDateAudio(avatar.date, false); subtitle = String.format(Locale.US, "%s, DC%d", subtitle, avatar.dc_id); }