mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
internal/atlas: add an assertion at SetIsolated
This commit is contained in:
parent
86a0a4154d
commit
9bf5f2188f
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user