Skip to content

Commit 33abf5d

Browse files
committed
8255248: NullPointerException in JFXPanel due to race condition in HostContainer
8334593: Adding, removing and then adding a JFXPanel again leads to NullPointerException Reviewed-by: angorya, kcr
1 parent f87448e commit 33abf5d

File tree

3 files changed

+269
-73
lines changed

3 files changed

+269
-73
lines changed

modules/javafx.graphics/src/main/java/com/sun/javafx/tk/quantum/GlassScene.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,10 @@ final SceneState getSceneState() {
249249
}
250250

251251
final void updateSceneState() {
252-
// should only be called on the event thread
253-
sceneState.update();
252+
// should only be called on the FX application thread
253+
if (sceneState != null) {
254+
sceneState.update();
255+
}
254256
}
255257

256258
protected View getPlatformView() {

0 commit comments

Comments
 (0)