On Sun, 6 Oct 2024 19:12:42 GMT, Thiago Milczarek Sayao <tsa...@openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/prism/es2/ES2SwapChain.java >> line 193: >> >>> 191: @Override >>> 192: public ES2Graphics createGraphics() { >>> 193: if (drawable == null || drawable.getNativeWindow() != >>> pState.getNativeWindow()) { >> >> The null check wasn't here before, and it doesn't seem necessary as >> `createGLDrawable()` does not return `null`. > > But drawable can now be disposed and set to null. If that happens and > `createGraphics` is called again it will end in a NPE. The NPE would be a good thing then, as no method should be called on a disposed object (except for `dispose`). ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1586#discussion_r1789427891