Fixed bug where nil was stored as a scaled texture.

This commit is contained in:
Sander Schobers 2020-05-17 07:54:19 +02:00
parent b9534ee255
commit b78f215c8c

View File

@ -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