Skip to content

Commit

Permalink
Popup: fixed potential NPE in (unusual) case that the popup invoker i…
Browse files Browse the repository at this point in the history
…s `null` (only on Linux with Wayland and Java 21; regression in 3.2.3) (issue #752)
  • Loading branch information
DevCharly committed Oct 21, 2023
1 parent 13a418f commit 2a237ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
FlatLaf Change Log
==================

## 3.2.4

#### Fixed bugs

- Popup: Fixed potential NPE in (unusual) case that the popup invoker is `null`
(only on Linux with Wayland and Java 21; regression in 3.2.3). (issue #752)


## 3.2.3

#### Fixed bugs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ private static boolean overlapsHeavyWeightComponent( Component parent, Rectangle
*/
private static void fixLinuxWaylandJava21focusIssue( Component owner ) {
// only necessary on Linux when running in Java 21+
if( !SystemInfo.isLinux || SystemInfo.javaVersion < SystemInfo.toVersion( 21, 0, 0, 0 ) )
if( owner == null || !SystemInfo.isLinux || SystemInfo.javaVersion < SystemInfo.toVersion( 21, 0, 0, 0 ) )
return;

// get window
Expand Down

0 comments on commit 2a237ff

Please sign in to comment.