Fix profiler crash by builtin since previous commit

* Commit 1efec3cbf3190a3d7e166c68c4fe766180b326fa involved
* Default to '??' (common Minetest notation) for unknown mods.
* related to https://codeberg.org/minenux/minetest-engine-minetest/issues/33
* backporting 291b2446f1
This commit is contained in:
mckaygerhard 2023-07-21 22:38:11 -04:00
parent 1efec3cbf3
commit d07cc1e760

View File

@ -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