diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a4a6f79..a12a73fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,20 @@ FlatLaf Change Log ================== +## 3.2.5 + +#### Fixed bugs + +- Popup: Fixed NPE if popup invoker is `null` on Windows 10. (issue #753; + regression in 3.2.1 in fix for #626) + + ## 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) +- Popup: Fixed NPE if popup invoker is `null` on Linux with Wayland and Java 21. + (issue #752; regression in 3.2.3) ## 3.2.3 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 013d86b7..eeca80ef 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 @@ -397,6 +397,9 @@ public class FlatPopupFactory } private static boolean overlapsHeavyWeightComponent( Component owner, Component contents, int x, int y ) { + if( owner == null ) + return false; + Window window = SwingUtilities.getWindowAncestor( owner ); if( window == null ) return false;