mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
internal/atlas: add an argument check
This commit is contained in:
parent
29f7a45ccc
commit
5c3f8915d1
@ -563,6 +563,9 @@ func (i *Image) replacePixels(pix []byte, mask []byte) {
|
||||
|
||||
px, py, pw, ph := i.regionWithPadding()
|
||||
if pix == nil {
|
||||
if mask != nil {
|
||||
panic("atlas: mask must be nil when pix is nil")
|
||||
}
|
||||
i.backend.restorable.ReplacePixels(nil, nil, px, py, pw, ph)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user