From 2db7f85e9b181f4ebd25e9767762039ec1a58159 Mon Sep 17 00:00:00 2001 From: Wenxi Zeng Date: Tue, 28 Sep 2021 14:21:50 -0700 Subject: [PATCH] add null check on formatProducts --- .../android/integrations/firebase/FirebaseIntegration.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/segment/analytics/android/integrations/firebase/FirebaseIntegration.java b/src/main/java/com/segment/analytics/android/integrations/firebase/FirebaseIntegration.java index a714665..cb21720 100644 --- a/src/main/java/com/segment/analytics/android/integrations/firebase/FirebaseIntegration.java +++ b/src/main/java/com/segment/analytics/android/integrations/firebase/FirebaseIntegration.java @@ -224,6 +224,8 @@ && isNullOrEmpty(properties.currency())) { private static ArrayList formatProducts(List products) { ArrayList mappedProducts = new ArrayList<>(); + if (products == null) return mappedProducts; + for (ValueMap product : products) { Bundle mappedProduct = new Bundle(); for (Map.Entry innerEntry : product.entrySet()) {