diff --git a/app/src/main/java/me/devsaki/hentoid/activities/sources/BaseWebActivity.java b/app/src/main/java/me/devsaki/hentoid/activities/sources/BaseWebActivity.java index 86b68b000..aec8f2f4e 100644 --- a/app/src/main/java/me/devsaki/hentoid/activities/sources/BaseWebActivity.java +++ b/app/src/main/java/me/devsaki/hentoid/activities/sources/BaseWebActivity.java @@ -650,9 +650,11 @@ public void onGalleryPageStarted() { // Greys out the action button // useful for sites with JS loading that do not trigger onPageStarted (e.g. Luscious, Pixiv) runOnUiThread(() -> { - binding.actionButton.setImageDrawable(ContextCompat.getDrawable(this, downloadIcon)); - binding.actionButton.setVisibility(View.INVISIBLE); - binding.actionBtnBadge.setVisibility(View.INVISIBLE); + if (binding != null) { + binding.actionButton.setImageDrawable(ContextCompat.getDrawable(this, downloadIcon)); + binding.actionButton.setVisibility(View.INVISIBLE); + binding.actionBtnBadge.setVisibility(View.INVISIBLE); + } }); }