diff --git a/game/engines/default/engine/Map.lua b/game/engines/default/engine/Map.lua
index 08dc2ae80d07296a7328b9e1593593f66ff270b6..83f6056f2db0662e3b4ff20d863a324e200efc28 100644
--- a/game/engines/default/engine/Map.lua
+++ b/game/engines/default/engine/Map.lua
@@ -380,6 +380,8 @@ end
 --- Updates the map on the given spot
 -- This updates many things, from the C map object, the FOV caches, the minimap if it exists, ...
 function _M:updateMap(x, y)
+	if not x or not y or x < 0 or y < 0 or x >= self.w or y >= self.h then return end
+
 	-- Update minimap if any
 	local mos = {}