You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/04/28 17:23:54 UTC

svn commit: r533356 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

Author: jacopoc
Date: Sat Apr 28 08:23:54 2007
New Revision: 533356

URL: http://svn.apache.org/viewvc?view=rev&rev=533356
Log:
Fixed npe when in the cart there is a non product item.

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?view=diff&rev=533356&r1=533355&r2=533356
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Sat Apr 28 08:23:54 2007
@@ -3728,6 +3728,9 @@
                 double dropShipQuantity = 0;
 
                 GenericValue product = cartItem.getProduct();
+                if (product == null) {
+                    continue;
+                }
                 String productId = product.getString("productId");
                 String requirementMethodEnumId = product.getString("requirementMethodEnumId");