fix newly introduced bug in Sprite.SetPicture

This commit is contained in:
faiface 2017-03-08 00:43:53 +01:00
parent 6874fff0f6
commit 43aae3d3bd
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ func (s *Sprite) SetPicture(pic Picture) {
oldPic := s.d.Picture oldPic := s.d.Picture
s.d.Picture = pic s.d.Picture = pic
if oldPic.Bounds() == pic.Bounds() { if oldPic != nil && oldPic.Bounds() == pic.Bounds() {
return return
} }