diff --git a/graphics.go b/graphics.go index ee14c96387d6766ee162a8fa5da99a9a5e46508d..106d8704cb00ac0a8dd5bad0e88b519c2d75d22a 100644 --- a/graphics.go +++ b/graphics.go @@ -187,7 +187,7 @@ func NewSprite(pic *Picture) *Sprite { func (s *Sprite) SetPicture(pic *Picture) { oldPic := s.pic s.pic = pic - if oldPic.Bounds().Size == pic.Bounds().Size { + if oldPic != nil && oldPic.Bounds().Size == pic.Bounds().Size { return } w, h := pic.Bounds().Size.XY()