From 83a4fbaf489eb5c3cd3bb52408f007f864523f44 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 1 Jun 2012 01:46:26 +0800 Subject: [PATCH] IDEMPIERE-284 zk: Moving tree item using drag and drop sometime throw NPE --- .../src/org/adempiere/webui/component/ADTreeOnDropListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java index 52fb0bb6ba..e6888c84f5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java @@ -147,7 +147,7 @@ public class ADTreeOnDropListener implements EventListener { treeModel.addNode(newParent, movingNode, index); int path[] = treeModel.getPath(movingNode); - if (TreeUtils.isOnInitRenderPosted(tree)) + if (TreeUtils.isOnInitRenderPosted(tree) || tree.getTreechildren() == null) { tree.onInitRender(); }