Skip to content

Commit

Permalink
fix: add NPE guard when invalidate path (#119)
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
  • Loading branch information
lstocchi authored Dec 1, 2021
1 parent 7bc0def commit 140e4ab
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public MutableModelSynchronizer(StructureTreeModel treeModel,
private void invalidatePath(Supplier<TreePath> pathSupplier) {
treeModel.getInvoker().invokeLater(() -> {
TreePath path = pathSupplier.get();
if (path == null) {
return;
}
if (path.getLastPathComponent() == treeModel.getRoot()) {
invalidateRoot();
}
Expand Down

0 comments on commit 140e4ab

Please sign in to comment.