On Wed, 19 Jul 2023 06:02:13 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>> Due to transient datatype of scenePeer, it can become null which can result 
>> in NPE in scenarios where scene is continuously been reset and set, which 
>> warrants a null check, as is done in other places for the same variable.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Add lock for read/write of scenePeer/stagePeer and added system test

modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 428:

> 426:     private void sendMouseEventToFX(MouseEvent e) {
> 427:         EmbeddedSceneInterface lScenePeer = getScenePeer();
> 428:         if (lScenePeer == null || !isFxEnabled()) {

Probably minor, but maybe we should first check `!isFxEnabled()` and return 
fast before we actually call `getScenePeer()` and thus locking it

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1178#discussion_r1269185672

Reply via email to