From fe5c3354fc968961e6eabadaed3eeb407bacd229 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 26 Mar 2023 18:52:55 +0900 Subject: [PATCH] internal/graphicsdriver/directx: bug fix: missing error checking --- internal/graphicsdriver/directx/graphics12_windows.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/graphicsdriver/directx/graphics12_windows.go b/internal/graphicsdriver/directx/graphics12_windows.go index 5046615b9..998f6bb7b 100644 --- a/internal/graphicsdriver/directx/graphics12_windows.go +++ b/internal/graphicsdriver/directx/graphics12_windows.go @@ -481,7 +481,9 @@ func (g *graphics12) updateSwapChain(width, height int) error { } func (g *graphics12) initSwapChainDesktop(width, height int) error { - g.graphicsInfra.initSwapChain(width, height, unsafe.Pointer(g.commandQueue), g.window) + if err := g.graphicsInfra.initSwapChain(width, height, unsafe.Pointer(g.commandQueue), g.window); err != nil { + return err + } // TODO: Get the current buffer index?