# HG changeset patch # User mcherkas # Date 1478625073 -10800 # Node ID 92f0b90eb2aeb637c3a30e1520b05ca7d330428e # Parent 64f91947fa52f71604141d78ccba44f4a92a5d8a 8156723: JVM crash at sun.java2d.windows.GDIBlitLoops.nativeBlit Reviewed-by: serb diff -r 64f91947fa52 -r 92f0b90eb2ae 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);