Skip to content

Commit

Permalink
add nil check to do_runaway_from
Browse files Browse the repository at this point in the history
  • Loading branch information
tenplus1 committed Oct 1, 2020
1 parent f14050a commit f7a1b27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local use_cmi = minetest.global_exists("cmi")

mobs = {
mod = "redo",
version = "20200923",
version = "20201001",
intllib = S,
invis = minetest.global_exists("invisibility") and invisibility or {}
}
Expand Down Expand Up @@ -1904,7 +1904,7 @@ function mob_class:do_runaway_from()
return
end

local s = self.object:get_pos()
local s = self.object:get_pos() ; if not s then return end
local p, sp, dist, pname
local player, obj, min_player, name
local min_dist = self.view_range + 1
Expand Down

0 comments on commit f7a1b27

Please sign in to comment.