--- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m Wed Jul 24 10:24:35 2019 +0530
+++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m Wed Jul 24 11:08:24 2019 +0530
@@ -518,7 +518,7 @@
}
dstOps = (BMTLSDOps *)jlong_to_ptr(pDst);
- [MTLContext setSurfacesEnv:env src:pSrc dst:pDst];
+ mtlc = [MTLContext setSurfacesEnv:env src:pSrc dst:pDst];
}
break;
case sun_java2d_pipe_BufferedOpCodes_SET_SCRATCH_SURFACE:
@@ -801,8 +801,10 @@
onSurfaceModified(dstOps);
}
- RESET_PREVIOUS_OP();
- scheduleBlitAllModifiedLayers();
+ if (mtlc != NULL) {
+ RESET_PREVIOUS_OP();
+ scheduleBlitAllModifiedLayers();
+ }
}
/**