CheckBox and RadioButton: fixed NPE when button has children (similar to PR #68)

This commit is contained in:
Karl Tauber
2020-02-21 16:52:38 +01:00
parent 5c4ef3b0f5
commit dd155e9f89
2 changed files with 3 additions and 0 deletions

View File

@@ -101,6 +101,8 @@ public class FlatRadioButtonUI
@Override
public Dimension getPreferredSize( JComponent c ) {
Dimension size = super.getPreferredSize( c );
if( size == null )
return null;
// small insets fix
int focusWidth = getIconFocusWidth( c );