From ff26a5c77fb5959cdf49a6c5260a6f8fa18e0603 Mon Sep 17 00:00:00 2001 From: kizune Date: Thu, 6 Sep 2012 14:59:54 +0400 Subject: [PATCH] 7175183: [macosx] Objective-C exception thrown when switching monitor configuration Reviewed-by: prr, serb --- src/share/classes/sun/awt/image/VolatileSurfaceManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/share/classes/sun/awt/image/VolatileSurfaceManager.java b/src/share/classes/sun/awt/image/VolatileSurfaceManager.java index 95dc697ff..aa43f19e1 100644 --- a/src/share/classes/sun/awt/image/VolatileSurfaceManager.java +++ b/src/share/classes/sun/awt/image/VolatileSurfaceManager.java @@ -333,11 +333,12 @@ public abstract class VolatileSurfaceManager // using a SurfaceData that was created in a different // display mode. sdBackup = null; - sdCurrent = getBackupSurface(); // Now, invalidate the old hardware-based SurfaceData + // Note that getBackupSurface may set sdAccel to null so we have to invalidate it before SurfaceData oldData = sdAccel; sdAccel = null; oldData.invalidate(); + sdCurrent = getBackupSurface(); } // Update graphicsConfig for the vImg in case it changed due to // this display change event -- GitLab