Skip to content

Commit c092ab6

Browse files
committed
JBR-9561 Wayland: Cannot invoke "WLMainSurface.hasSurfaceData()" because "this.wlSurface" is null
1 parent 84dda25 commit c092ab6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/java.desktop/unix/classes/sun/awt/wl/WLComponentPeer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,6 +1778,10 @@ void notifyConfigured(int newSurfaceX, int newSurfaceY, int newSurfaceWidth, int
17781778
changeSizeToConfigured(newSurfaceWidth, newSurfaceHeight);
17791779
}
17801780

1781+
// May have been hidden on another thread. If performUnlocked() was called earlier in this method,
1782+
// the state protected by the AWT lock may have changed since the start of the method.
1783+
if (!isVisible()) return;
1784+
17811785
if (!wlSurface.hasSurfaceData()) {
17821786
wlSurface.associateWithSurfaceData(surfaceData);
17831787
}

0 commit comments

Comments
 (0)