mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 23:37:13 -06:00
fixed NPE in FlatUIUtils.isCellEditor() (issue #601)
This commit is contained in:
@@ -23,6 +23,7 @@ FlatLaf Change Log
|
|||||||
feedback only for left mouse button.
|
feedback only for left mouse button.
|
||||||
- ScaledImageIcon: Do not throw exceptions if image was has invalid size (e.g.
|
- ScaledImageIcon: Do not throw exceptions if image was has invalid size (e.g.
|
||||||
not found). Instead, paint a red rectangle (similar to `FlatSVGIcon`).
|
not found). Instead, paint a red rectangle (similar to `FlatSVGIcon`).
|
||||||
|
- Fixed NPE in `FlatUIUtils.isCellEditor()`. (issue #601)
|
||||||
|
|
||||||
|
|
||||||
## 2.5
|
## 2.5
|
||||||
|
|||||||
@@ -210,6 +210,9 @@ public class FlatUIUtils
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isCellEditor( Component c ) {
|
public static boolean isCellEditor( Component c ) {
|
||||||
|
if( c == null )
|
||||||
|
return false;
|
||||||
|
|
||||||
// check whether used in cell editor (check 3 levels up)
|
// check whether used in cell editor (check 3 levels up)
|
||||||
Component c2 = c;
|
Component c2 = c;
|
||||||
for( int i = 0; i <= 2 && c2 != null; i++ ) {
|
for( int i = 0; i <= 2 && c2 != null; i++ ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user