From e73902b23665b14c1524ffb26ed72f17939b5816 Mon Sep 17 00:00:00 2001
From: Eric Wykoff <ericwykoff@yahoo.com>
Date: Wed, 11 Feb 2015 09:46:50 -0600
Subject: [PATCH] sanity check

---
 game/modules/tome/class/Actor.lua | 1 +
 1 file changed, 1 insertion(+)

diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua
index 97bfeba122..c242a3dfb1 100644
--- a/game/modules/tome/class/Actor.lua
+++ b/game/modules/tome/class/Actor.lua
@@ -1456,6 +1456,7 @@ function _M:teleportRandom(x, y, dist, min_dist)
 	if dist == 0 then
 		x, y = util.findFreeGrid(x, y, 5, true, {[Map.ACTOR]=true})	
 	end
+	if not x or not y then return end
 	
 	-- Store our old x, y to pass to our callback
 	local ox, oy = self.x, self.y
-- 
GitLab