internal/atlas: add an assertion at SetIsolated

This commit is contained in:
Hajime Hoshi 2022-06-06 08:25:43 +09:00
parent 86a0a4154d
commit 9bf5f2188f

View File

@ -712,6 +712,9 @@ func NewImage(width, height int) *Image {
} }
func (i *Image) SetIsolated(isolated bool) { func (i *Image) SetIsolated(isolated bool) {
if i.backend != nil {
panic("atlas: SetIsolated must be called before its backend is allocated")
}
i.isolated = isolated i.isolated = isolated
} }