diff --git a/CHANGELOG.md b/CHANGELOG.md index 73898d62..0a4a6f79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java index 80c24812..013d86b7 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java @@ -438,7 +438,7 @@ public class FlatPopupFactory */ 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