svn commit: r574538 - /ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutoptions.bsh

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r574538 - /ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutoptions.bsh

jacopoc
Author: jacopoc
Date: Tue Sep 11 03:05:25 2007
New Revision: 574538

URL: http://svn.apache.org/viewvc?rev=574538&view=rev
Log:
Applied fix for NPE by Bilgin Ibryam.

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutoptions.bsh

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutoptions.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutoptions.bsh?rev=574538&r1=574537&r2=574538&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutoptions.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/checkoutoptions.bsh Tue Sep 11 03:05:25 2007
@@ -90,10 +90,12 @@
     cartParties.add(shoppingCart.getSupplierAgentPartyId());
 }
 List salesReprs = (List)shoppingCart.getAdditionalPartyRoleMap().get("SALES_REP");
-for (int i = 0; i < salesReprs.size(); i++) {
-    String salesRep = (String)salesReprs.get(i);
-    if (!cartParties.contains(salesRep)) {
-        cartParties.add(salesRep);
+if (salesReprs != null) {
+    for (int i = 0; i < salesReprs.size(); i++) {
+        String salesRep = (String)salesReprs.get(i);
+        if (!cartParties.contains(salesRep)) {
+            cartParties.add(salesRep);
+        }
     }
 }
 context.put("cartParties", cartParties);