mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
PopupFactory: fixed NPE on Windows 10 when owner is null (issue #952)
This commit is contained in:
@@ -18,6 +18,7 @@ FlatLaf Change Log
|
||||
|
||||
- FileChooser: Improved performance when navigating to large directories with
|
||||
thousands of files. (issue #953)
|
||||
- PopupFactory: Fixed NPE on Windows 10 when `owner` is `null`. (issue #952)
|
||||
|
||||
|
||||
## 3.5.4
|
||||
|
||||
@@ -138,7 +138,7 @@ public class FlatPopupFactory
|
||||
|
||||
// create drop shadow popup
|
||||
Popup popupForScreenOfOwner = getPopupForScreenOfOwner( owner, contents, x, y, forceHeavyWeight );
|
||||
GraphicsConfiguration gc = owner.getGraphicsConfiguration();
|
||||
GraphicsConfiguration gc = (owner != null) ? owner.getGraphicsConfiguration() : null;
|
||||
return (gc != null && gc.isTranslucencyCapable())
|
||||
? new DropShadowPopup( popupForScreenOfOwner, owner, contents )
|
||||
: new NonFlashingPopup( popupForScreenOfOwner, owner, contents );
|
||||
@@ -306,7 +306,7 @@ public class FlatPopupFactory
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( gc == null )
|
||||
if( gc == null && owner != null )
|
||||
gc = owner.getGraphicsConfiguration();
|
||||
if( gc == null )
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user