On Mon, 16 Nov 2026 10:52:39 GMT, Jose Pereda <[email protected]> wrote:

> This PR removes the stage from the active windows list after the stage gets 
> hidden/closed, preventing a possible NPE in WindowStage::setIconified.
> 
> Similar to [JDK-8387626](https://bugs.openjdk.org/browse/JDK-8387626), that 
> got fixed removing the stage from the active windows list after there was a 
> `WindowEvent.DESTROY` event in `GlassWindowEventHandler::get`, in this case 
> the Window::hide` event doesn't produce a `WindowEvent.CLOSE` event. 
> Therefore, the fix goes directly in `WindowStage::close`.
> 
> A system test that fails before the proposed fix, and passes after it, has 
> been included.
> 
> ---------
> - [X] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: e6a0dac8
Author:    Jose Pereda <[email protected]>
URL:       
https://git.openjdk.org/jfx/commit/e6a0dac82c6815ff038500dd023e84f7bd1757cc
Stats:     138 lines in 2 files changed: 138 ins; 0 del; 0 mod

8397186: java.lang.NullPointerException: Cannot invoke 
"com.sun.glass.ui.Window.isMinimized()" because "this.platformWindow" is null 
(2)

Reviewed-by: angorya, kcr

-------------

PR: https://git.openjdk.org/jfx/pull/2373

Reply via email to