From b78f215c8c05011dc1b3ef9628aafa21364442b9 Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Sun, 17 May 2020 07:54:19 +0200 Subject: [PATCH] Fixed bug where nil was stored as a scaled texture. --- ui/textures.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/textures.go b/ui/textures.go index f19f02f..b652912 100644 --- a/ui/textures.go +++ b/ui/textures.go @@ -109,6 +109,9 @@ func (t *Textures) Scaled(texture Texture, scale float32) Texture { } } scaled := ScaleTexture(t.render, texture, scale) + if scaled == nil { + return nil + } textures[scale] = scaled t.scaled[texture] = textures return scaled