Linux: fixed NPE when using FlatLaf window decorations and switching theme (issue #933; regression in 3.5.3)

caused by fix for #907; commit d471f08b15
This commit is contained in:
Karl Tauber
2024-12-09 00:43:44 +01:00
parent 6991d6729e
commit 0a9ecd66a9
2 changed files with 5 additions and 1 deletions

View File

@@ -7,6 +7,8 @@ FlatLaf Change Log
- HTML: Fixed NPE when using HTML text on a component with `null` font. (issue - HTML: Fixed NPE when using HTML text on a component with `null` font. (issue
#930; PR #931; regression in 3.5) #930; PR #931; regression in 3.5)
- Linux: Fixed NPE when using FlatLaf window decorations and switching theme.
(issue #933; regression in 3.5.3)
## 3.5.3 ## 3.5.3

View File

@@ -272,7 +272,8 @@ public abstract class FlatWindowResizer
public void doLayout() { public void doLayout() {
super.doLayout(); super.doLayout();
centerComp.setBounds( 0, 0, resizeComp.getWidth(), resizeComp.getHeight() ); if( centerComp != null && centerComp.isVisible() )
centerComp.setBounds( 0, 0, resizeComp.getWidth(), resizeComp.getHeight() );
} }
@Override @Override
@@ -376,6 +377,7 @@ public abstract class FlatWindowResizer
@Override @Override
protected void beginResizing( int resizeDir ) { protected void beginResizing( int resizeDir ) {
centerComp.setBounds( 0, 0, resizeComp.getWidth(), resizeComp.getHeight() );
centerComp.setCursor( getPredefinedCursor( resizeDir ) ); centerComp.setCursor( getPredefinedCursor( resizeDir ) );
centerComp.setVisible( true ); centerComp.setVisible( true );
} }