mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
parent
dce18d7c23
commit
22118ba962
@ -405,6 +405,10 @@ func (u *userInterfaceImpl) getAndResetIconImages() []image.Image {
|
||||
func (u *userInterfaceImpl) setIconImages(iconImages []image.Image) {
|
||||
u.m.Lock()
|
||||
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))
|
||||
copy(u.iconImages, iconImages)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user