mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
fix crash when app jump to camera (#10255)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user