mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/goglfw: ignore the invalid-handle error at DestroyWindow
Updates #2551
This commit is contained in:
parent
65afb51d73
commit
6817be2594
@ -309,7 +309,9 @@ func platformTerminate() error {
|
|||||||
|
|
||||||
if _glfw.platformWindow.helperWindowHandle != 0 {
|
if _glfw.platformWindow.helperWindowHandle != 0 {
|
||||||
if !microsoftgdk.IsXbox() {
|
if !microsoftgdk.IsXbox() {
|
||||||
if err := _DestroyWindow(_glfw.platformWindow.helperWindowHandle); 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(_glfw.platformWindow.helperWindowHandle); err != nil && !errors.Is(err, windows.ERROR_INVALID_WINDOW_HANDLE) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user