8156723: JVM crash at sun.java2d.windows.GDIBlitLoops.nativeBlit
Reviewed-by: serb
--- a/jdk/src/java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp Tue Nov 08 17:10:12 2016 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp Tue Nov 08 20:11:13 2016 +0300
@@ -128,7 +128,7 @@
return;
}
hDC = comp->GetDCFromComponent();
- if (hDC != NULL) {
+ if (hDC != NULL && wsdo->device != NULL) {
::SelectObject(hDC, nullbrush);
::SelectObject(hDC, nullpen);
::SelectClipRgn(hDC, (HRGN) NULL);