Author: lektran
Date: Thu Apr 26 22:11:17 2007
New Revision: 532965
URL:
http://svn.apache.org/viewvc?view=rev&rev=532965Log:
Applied fix from trunk for revision: 532919
Modified:
ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderServices.java
Modified: ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderServices.java?view=diff&rev=532965&r1=532964&r2=532965==============================================================================
--- ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderServices.java Thu Apr 26 22:11:17 2007
@@ -2827,7 +2827,12 @@
// try looking up the parent product if the product has no content and is a variant
if (((allProductContent == null) || allProductContent.size() == 0) && ("Y".equals(product.getString("isVariant")))) {
GenericValue parentProduct = ProductWorker.getParentProduct(product.getString("productId"), delegator);
- allProductContent.addAll(parentProduct.getRelated("ProductContent"));
+ if (allProductContent == null) {
+ allProductContent = FastList.newInstance();
+ }
+ if (parentProduct != null) {
+ allProductContent.addAll(parentProduct.getRelated("ProductContent"));
+ }
}
if (allProductContent != null && allProductContent.size() > 0) {