fix crash when app jump to camera (#10255)

This commit is contained in:
timlyeee
2022-03-08 09:42:23 +08:00
committed by GitHub
parent 62f06c6ef7
commit bb62e41c40
2 changed files with 6 additions and 2 deletions
@@ -116,7 +116,9 @@ void GLES2Swapchain::doResize(uint32_t width, uint32_t height, SurfaceTransform
_colorTexture->resize(width, height);
_depthStencilTexture->resize(width, height);
doCreateSurface(_windowHandle);
if (_windowHandle) {
doCreateSurface(_windowHandle);
}
}
void GLES2Swapchain::doDestroySurface() {
@@ -116,7 +116,9 @@ void GLES3Swapchain::doResize(uint32_t width, uint32_t height, SurfaceTransform
_colorTexture->resize(width, height);
_depthStencilTexture->resize(width, height);
doCreateSurface(_windowHandle);
if (_windowHandle) {
doCreateSurface(_windowHandle);
}
}
void GLES3Swapchain::doDestroySurface() {