diff --git a/substance/src/main/java/org/pushingpixels/substance/internal/ui/SubstanceTreeUI.java b/substance/src/main/java/org/pushingpixels/substance/internal/ui/SubstanceTreeUI.java index 7334b85d..95bc5476 100644 --- a/substance/src/main/java/org/pushingpixels/substance/internal/ui/SubstanceTreeUI.java +++ b/substance/src/main/java/org/pushingpixels/substance/internal/ui/SubstanceTreeUI.java @@ -522,9 +522,11 @@ public void run() { .getOldValue(); if (oldValue != null && oldValue.getPath() != null) { TreePath oldDrop = oldValue.getPath(); - Rectangle oldBounds = getPathBounds(tree, oldDrop); - tree.repaint(0, oldBounds.y, tree.getWidth(), - oldBounds.height); + if (oldDrop != null) { + Rectangle oldBounds = getPathBounds(tree, oldDrop); + tree.repaint(0, oldBounds.y, tree.getWidth(), + oldBounds.height); + } } JTree.DropLocation currLocation = tree.getDropLocation(); if (currLocation != null) {