Browse Source

Test

master
Chimo 1 year ago
parent
commit
75876870ad
No known key found for this signature in database
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      enabler/src/de/schildbach/pte/dto/Trip.java

+ 5
- 3
enabler/src/de/schildbach/pte/dto/Trip.java View File

@@ -222,9 +222,11 @@ public final class Trip implements Serializable {
222 222
     public Set<Product> products() {
223 223
         final Set<Product> products = EnumSet.noneOf(Product.class);
224 224
 
225
-        for (final Leg leg : legs)
226
-            if (leg instanceof Public)
227
-                products.add(((Public) leg).line.product);
225
+        if (products != null) {
226
+            for (final Leg leg : legs)
227
+                if (leg instanceof Public)
228
+                    products.add(((Public) leg).line.product);
229
+        }
228 230
 
229 231
         return products;
230 232
     }

Loading…
Cancel
Save