Skip to content

Commit 2db7f85

Browse files
committed
add null check on formatProducts
1 parent 7d03a6a commit 2db7f85

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/com/segment/analytics/android/integrations/firebase/FirebaseIntegration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ && isNullOrEmpty(properties.currency())) {
224224

225225
private static ArrayList<Bundle> formatProducts(List<ValueMap> products) {
226226
ArrayList<Bundle> mappedProducts = new ArrayList<>();
227+
if (products == null) return mappedProducts;
228+
227229
for (ValueMap product : products) {
228230
Bundle mappedProduct = new Bundle();
229231
for (Map.Entry<String, Object> innerEntry : product.entrySet()) {

0 commit comments

Comments
 (0)