Skip to content

Commit

Permalink
fixed NPE in FlatUIUtils.isCellEditor() (issue #601)
Browse files Browse the repository at this point in the history
  • Loading branch information
DevCharly committed Oct 17, 2022
1 parent bc7c68e commit 36c405c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -23,6 +23,7 @@ FlatLaf Change Log
feedback only for left mouse button.
- ScaledImageIcon: Do not throw exceptions if image was has invalid size (e.g.
not found). Instead, paint a red rectangle (similar to `FlatSVGIcon`).
- Fixed NPE in `FlatUIUtils.isCellEditor()`. (issue #601)


## 2.5
Expand Down
Expand Up @@ -210,6 +210,9 @@ public static int minimumHeight( JComponent c, int minimumHeight ) {
}

public static boolean isCellEditor( Component c ) {
if( c == null )
return false;

// check whether used in cell editor (check 3 levels up)
Component c2 = c;
for( int i = 0; i <= 2 && c2 != null; i++ ) {
Expand Down

0 comments on commit 36c405c

Please sign in to comment.