diff options
Diffstat (limited to 'src/map/script-fun.cpp')
-rw-r--r-- | src/map/script-fun.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index ab60535..8c90052 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -4637,7 +4637,9 @@ void builtin_getmap(ScriptState *st) else sd = script_rid2sd(st); - nullpo_retv(sd); + if (!sd || !as_raw_pointer(Some(sd->bl_m)) || sd->bl_m == borrow(undefined_gat)) + return; + push_str<ScriptDataStr>(st->stack, sd->bl_m->name_); } |