mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/graphicsdriver/directx: bug fix: the screen image can be nil when resizing the window
Closes #2081
This commit is contained in:
parent
38a2aa11fd
commit
7321e86a6b
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user