internal/atlas: add an argument check

This commit is contained in:
Hajime Hoshi 2022-03-21 15:11:38 +09:00
parent 29f7a45ccc
commit 5c3f8915d1

View File

@ -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
}