mirror of
https://github.com/cocos/cocos-engine.git
synced 2026-09-07 00:02:53 +08:00
fix crash while dynamic call createSurface (#12829)
* fix crash while dynamic call createSurface * Fix the application crash when returning from the background to the foreground
This commit is contained in:
@@ -45,7 +45,9 @@ ISystemWindow *SystemWindowManager::createWindow(const ISystemWindowInfo &info)
|
||||
if (!info.externalHandle || !isExternalHandleExist(info.externalHandle)) {
|
||||
ISystemWindow *window = BasePlatform::getPlatform()->createNativeWindow(_nextWindowId, info.externalHandle);
|
||||
if (window) {
|
||||
window->createWindow(info.title.c_str(), info.x, info.y, info.width, info.height, info.flags);
|
||||
if (!info.externalHandle) {
|
||||
window->createWindow(info.title.c_str(), info.x, info.y, info.width, info.height, info.flags);
|
||||
}
|
||||
_windows[_nextWindowId] = std::shared_ptr<ISystemWindow>(window);
|
||||
_nextWindowId++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user