8156723: JVM crash at sun.java2d.windows.GDIBlitLoops.nativeBlit
authormcherkas
Tue, 08 Nov 2016 20:11:13 +0300
changeset 42204 92f0b90eb2ae
parent 42203 64f91947fa52
child 42205 9c0dd0361d9d
8156723: JVM crash at sun.java2d.windows.GDIBlitLoops.nativeBlit Reviewed-by: serb
jdk/src/java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp
--- 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);