diff --git a/applications/content/src/org/ofbiz/content/ContentManagementServices.java b/applications/content/src/org/ofbiz/content/ContentManagementServices.java index 2d77ff8599..3b224bf012 100644 --- a/applications/content/src/org/ofbiz/content/ContentManagementServices.java +++ b/applications/content/src/org/ofbiz/content/ContentManagementServices.java @@ -1591,8 +1591,11 @@ public class ContentManagementServices { Debug.logError(msg, module); return ServiceUtil.returnError(msg); } - Long useTime = (Long)productContent.get("useTime"); - Integer newUseTime = Integer.valueOf(useTime.intValue() * qty.intValue()); + Long useTime = (Long) productContent.get("useTime"); + Integer newUseTime = null; + if (UtilValidate.isNotEmpty(useTime)) { + newUseTime = Integer.valueOf(useTime.intValue() * qty.intValue()); + } context.put("useTime", newUseTime); context.put("useTimeUomId", productContent.get("useTimeUomId")); context.put("useRoleTypeId", productContent.get("useRoleTypeId"));