On Fri, 31 Oct 2025 11:03:39 GMT, Lukasz Kostyra <[email protected]> wrote:

>> 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.

If this change fixes this particular issue, then can the calls 
`!resource.isValid()` be removed ?

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

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

Reply via email to