From a330f6f689cee41df2d4ca63b023b07c9a1e0592 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Thu, 23 Apr 2015 13:33:34 -0500 Subject: [PATCH] Prevent NPE when thumbnail click not set Fixes #3042 Fixes #3044 Closes #3046 // FREEBIE --- .../thoughtcrime/securesms/components/ThumbnailView.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/components/ThumbnailView.java b/src/org/thoughtcrime/securesms/components/ThumbnailView.java index 5a98fe2415..d8b5557533 100644 --- a/src/org/thoughtcrime/securesms/components/ThumbnailView.java +++ b/src/org/thoughtcrime/securesms/components/ThumbnailView.java @@ -177,7 +177,11 @@ public class ThumbnailView extends ForegroundImageView { @Override public void onClick(View view) { - listener.onClick(view, slide); + if (listener != null) { + listener.onClick(view, slide); + } else { + Log.w(TAG, "onClick, but no thumbnail click listener attached."); + } } }