mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
parent
dce18d7c23
commit
22118ba962
@ -405,6 +405,10 @@ func (u *userInterfaceImpl) getAndResetIconImages() []image.Image {
|
|||||||
func (u *userInterfaceImpl) setIconImages(iconImages []image.Image) {
|
func (u *userInterfaceImpl) setIconImages(iconImages []image.Image) {
|
||||||
u.m.Lock()
|
u.m.Lock()
|
||||||
defer u.m.Unlock()
|
defer u.m.Unlock()
|
||||||
|
|
||||||
|
// Even if iconImages is nil, always create a slice.
|
||||||
|
// A 0-size slice and nil are distinguished.
|
||||||
|
// See the comment in updateIconIfNeeded.
|
||||||
u.iconImages = make([]image.Image, len(iconImages))
|
u.iconImages = make([]image.Image, len(iconImages))
|
||||||
copy(u.iconImages, iconImages)
|
copy(u.iconImages, iconImages)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user