Skip to content

Commit

Permalink
Prevent crash in ReorderableCheckBoxList
Browse files Browse the repository at this point in the history
  • Loading branch information
tibagni committed May 6, 2024
1 parent 20cd10a commit fc39f59
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ public boolean canImport(TransferHandler.TransferSupport support) {
return false;
}

if (!support.isDrop()) {
return false;
}

JList.DropLocation dl = (JList.DropLocation) support.getDropLocation();
return dl.getIndex() != -1;
}
Expand Down

0 comments on commit fc39f59

Please sign in to comment.