Author: jacopoc
Date: Wed Jul 23 03:16:02 2008
New Revision: 679056
URL:
http://svn.apache.org/viewvc?rev=679056&view=revLog:
Small fix to prevent NPE under certain circumstances; still the code should be improved, but for now I am trying to change as less code as possible.
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java?rev=679056&r1=679055&r2=679056&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java Wed Jul 23 03:16:02 2008
@@ -536,8 +536,8 @@
GenericValue entity = delegator.findOne(entName, UtilMisc.toMap(pkName, id), false);
if (modelEntity.isField("childBranchCount")) {
entity.put("childBranchCount", nodeCount);
+ entity.store();
}
- entity.store();
}
} catch(GenericEntityException e) {
Debug.logError(e, module);