changeset 42204:92f0b90eb2ae

8156723: JVM crash at sun.java2d.windows.GDIBlitLoops.nativeBlit Reviewed-by: serb
author mcherkas
date Tue, 08 Nov 2016 20:11:13 +0300
parents 64f91947fa52
children 9c0dd0361d9d
files jdk/src/java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);