windows: Make window creation failable (#14395)

Release Notes:

- N/A
This commit is contained in:
张小白 2024-07-15 10:37:46 +08:00 committed by GitHub
parent 70d983abe3
commit ba09eabfba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 33 additions and 28 deletions

View file

@ -288,7 +288,7 @@ impl Platform for WindowsPlatform {
self.icon,
self.foreground_executor.clone(),
lock.current_cursor,
);
)?;
drop(lock);
let handle = window.get_raw_handle();
self.raw_window_handles.write().push(handle);