internal/graphicsdriver/directx: bug fix: the screen image can be nil when resizing the window

Closes #2081
This commit is contained in:
Hajime Hoshi 2022-04-26 01:12:52 +09:00
parent 38a2aa11fd
commit 7321e86a6b

View File

@ -577,7 +577,8 @@ func (g *Graphics) End(present bool) error {
return err
}
if present {
// The screen image can be nil in the very first frame (#2081).
if present && g.screenImage != nil {
g.screenImage.transiteState(g.drawCommandList, _D3D12_RESOURCE_STATE_PRESENT)
}