8156723: JVM crash at sun.java2d.windows.GDIBlitLoops.nativeBlit

Reviewed-by: serb
This commit is contained in:
Mikhail Cherkasov 2016-11-08 20:11:13 +03:00
parent b68a13573f
commit 2af32d911b

View File

@ -128,7 +128,7 @@ void SetupThreadGraphicsInfo(JNIEnv *env, GDIWinSDOps *wsdo) {
return;
}
hDC = comp->GetDCFromComponent();
if (hDC != NULL) {
if (hDC != NULL && wsdo->device != NULL) {
::SelectObject(hDC, nullbrush);
::SelectObject(hDC, nullpen);
::SelectClipRgn(hDC, (HRGN) NULL);