aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Ouellette <oue.paul18@gmail.com>2019-02-16 15:06:04 -0500
committerSmallJoker <SmallJoker@users.noreply.github.com>2019-02-16 21:06:04 +0100
commit291b2446f19209be20c4b7fb7587da44330429fd (patch)
tree40e58208b1c8ea8e2154e3a4afcf37afae8ae7bc
parent568540f8e973da7111e0c063c29bb5e7bc80b7ec (diff)
downloadminetest-291b2446f19209be20c4b7fb7587da44330429fd.tar.gz
minetest-291b2446f19209be20c4b7fb7587da44330429fd.tar.bz2
minetest-291b2446f19209be20c4b7fb7587da44330429fd.zip
Fix profiler crash by builtin since eea1fda (#8239)
Default to '??' (common Minetest notation) for unknown mods.
-rw-r--r--builtin/profiler/instrumentation.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/profiler/instrumentation.lua b/builtin/profiler/instrumentation.lua
index 7c21859d3..2ab658bb2 100644
--- a/builtin/profiler/instrumentation.lua
+++ b/builtin/profiler/instrumentation.lua
@@ -88,7 +88,7 @@ local function instrument(def)
if not def or not def.func then
return
end
- def.mod = def.mod or get_current_modname()
+ def.mod = def.mod or get_current_modname() or "??"
local modname = def.mod
local instrument_name = generate_name(def)
local func = def.func