Bug 221768 [Viewers] Fix for bug 210747 causes NPE when parent is TreePath.EMPTY
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
} else {
							items[i].dispose();
						}
					}
				}
				
				if (needDummy && !haveDummy) {
					newItem(ti, SWT.NULL, -1);
				}
				return;
			}
		}
		if (childElements.length > 0) {
			
			Object[] filtered = filter(parentElementOrTreePath, childElements);
			ViewerComparator comparator = getComparator();
			if (comparator != null) {
				if (comparator instanceof TreePathViewerSorter) {
					TreePathViewerSorter tpvs = (TreePathViewerSorter) comparator;
					if (path == null) {
						path = internalGetSorterParentPath(widget, comparator);
					}
					tpvs.sort(this, path, filtered);
				} else {
					comparator.sort(this, filtered);
				}
			}
			createAddedElements(widget, filtered);
		}
	}