From d5cd016776a8717be7bb1a26c3ceb993c77341da Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Thu, 18 Apr 2024 13:42:45 -0300 Subject: [PATCH] fix(push-notification-receiver): check if status is null before doing stuff --- .../org/joinmastodon/android/PushNotificationReceiver.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java b/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java index ad9280df9..82f142829 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java +++ b/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java @@ -133,7 +133,11 @@ public class PushNotificationReceiver extends BroadcastReceiver{ if(intent.hasExtra("notification")){ org.joinmastodon.android.model.Notification notification=Parcels.unwrap(intent.getParcelableExtra("notification")); - String statusID=notification.status.id; + + String statusID = null; + if(notification != null && notification.status != null) + statusID=notification.status.id; + if (statusID != null) { AccountSessionManager accountSessionManager = AccountSessionManager.getInstance(); Preferences preferences = accountSessionManager.getAccount(accountID).preferences;