--- old/src/share/classes/sun/awt/image/VolatileSurfaceManager.java 2012-09-04 13:37:25.000000000 +0400 +++ new/src/share/classes/sun/awt/image/VolatileSurfaceManager.java 2012-09-04 13:37:24.000000000 +0400 @@ -335,9 +335,12 @@ sdBackup = null; sdCurrent = getBackupSurface(); // Now, invalidate the old hardware-based SurfaceData - SurfaceData oldData = sdAccel; - sdAccel = null; - oldData.invalidate(); + // Note that getBackupSurface may set sdAccel to null!! + if (sdAccel != null) { + SurfaceData oldData = sdAccel; + sdAccel = null; + oldData.invalidate(); + } } // Update graphicsConfig for the vImg in case it changed due to // this display change event