changeset 16008:12948b3a7663

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