From 7b5ec06509fba1dcdedd04cd779135ac0e225257 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 10 Apr 2021 11:23:04 +0200 Subject: [PATCH] fix: fix a crash in TiledMultiMap --- sonic-radiance.love/scenes/overworld/map.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sonic-radiance.love/scenes/overworld/map.lua b/sonic-radiance.love/scenes/overworld/map.lua index c0b0376..2768bfd 100644 --- a/sonic-radiance.love/scenes/overworld/map.lua +++ b/sonic-radiance.love/scenes/overworld/map.lua @@ -145,6 +145,9 @@ end function TiledMultiMap:haveUpperLayerAtCoord(x, y) local wrapper = self:getMapAtPoint(x, y) + if (wrapper == nil) then + return false + end return wrapper:haveUpperLayerAtCoord(x, y) end