From 43aae3d3bd58198ede1474ce14371f7db567f0d7 Mon Sep 17 00:00:00 2001
From: faiface <faiface@ksp.sk>
Date: Wed, 8 Mar 2017 00:43:53 +0100
Subject: [PATCH] fix newly introduced bug in Sprite.SetPicture

---
 graphics.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/graphics.go b/graphics.go
index 9468d16..e525ef1 100644
--- a/graphics.go
+++ b/graphics.go
@@ -23,7 +23,7 @@ func (s *Sprite) SetPicture(pic Picture) {
 	oldPic := s.d.Picture
 	s.d.Picture = pic
 
-	if oldPic.Bounds() == pic.Bounds() {
+	if oldPic != nil && oldPic.Bounds() == pic.Bounds() {
 		return
 	}
 
-- 
GitLab