Skip to content

Commit 829fd1e

Browse files
committed
Merge pull request #51 from Leanplum/feature/fix-LP-5020
fix(PushService) add null checker for context and message.
1 parent 5233016 commit 829fd1e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

AndroidSDK/src/com/leanplum/LeanplumPushService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ static void handleNotification(final Context context, final Bundle message) {
283283
* Put the message into a notification and post it.
284284
*/
285285
private static void showNotification(Context context, Bundle message) {
286+
if (context == null || message == null) {
287+
return;
288+
}
289+
286290
NotificationManager notificationManager = (NotificationManager)
287291
context.getSystemService(Context.NOTIFICATION_SERVICE);
288292

0 commit comments

Comments
 (0)