RFR: 8352209: NPE com.sun.prism.d3d.D3DTextureData.getContext [v3]

Lukasz Kostyra lkostyra at openjdk.org
Fri Oct 31 11:06:31 UTC 2025


On Thu, 30 Oct 2025 15:22:59 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Lukasz Kostyra has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   BaseContext: Add maskTex checks to flushMask()
>
> modules/javafx.graphics/src/main/java/com/sun/prism/impl/BaseContext.java line 111:
> 
>> 109: 
>> 110:     protected final void flushMask() {
>> 111:         if (maskTex != null && maskTex.isSurfaceLost()) return;
> 
> if maskTex is null the subsequent calls could throw NPE, so maybe this should be:
> 
> 
>         if (maskTex == null || maskTex.isSurfaceLost()) return;

Fair point. I think this code works regardless because originally `maskTex` was supposed to be guarded by `curMaskRow` and `curMaskCol` below being set to zero.

I will change it to the above.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1951#discussion_r2481051890


More information about the openjfx-dev mailing list