mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
internal/goglfw: ignore invalid-window-handle error at DestroyWindow
Closes #2551
This commit is contained in:
parent
14b34a7b0a
commit
f5e0496611
@ -1458,7 +1458,9 @@ func (w *Window) platformDestroyWindow() error {
|
||||
|
||||
if w.platform.handle != 0 {
|
||||
if !microsoftgdk.IsXbox() {
|
||||
if err := _DestroyWindow(w.platform.handle); err != nil {
|
||||
// An error 'invalid window handle' can occur without any specific reasons (#2551).
|
||||
// As there is nothing to do, just ignore this error.
|
||||
if err := _DestroyWindow(w.platform.handle); err != nil && !errors.Is(err, windows.ERROR_INVALID_WINDOW_HANDLE) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user