fixed NPE in FlatUIUtils.isCellEditor() (issue #601)

This commit is contained in:
Karl Tauber
2022-10-17 18:09:12 +02:00
parent bc7c68ebe4
commit 36c405c708
2 changed files with 4 additions and 0 deletions

View File

@@ -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

View File

@@ -210,6 +210,9 @@ public class FlatUIUtils
}
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++ ) {