src/share/classes/sun/java2d/SunGraphics2D.java
Print this page
@@ -2348,11 +2348,11 @@
// caller of this method so that the pipe stays valid
// long enough to call the new primitive.
// REMIND: No locking yet in screen SurfaceData objects!
// surfaceData.lock();
surfaceData = surfaceData.getReplacement();
- if (surfaceData == null) {
+ if (surfaceData == null || !surfaceData.isValid()) {
surfaceData = NullSurfaceData.theInstance;
}
// this will recalculate the composite clip
setDevClip(surfaceData.getBounds());