summaryrefslogtreecommitdiff
path: root/src/map/script-fun.cpp
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2019-04-12 12:12:38 -0400
committergumi <git@gumi.ca>2019-04-15 11:58:44 -0400
commit1886d63ef5986a3e613b4880dc7ae00636435e0a (patch)
tree33da7b7c6e40eda3150da361038c668b546986d2 /src/map/script-fun.cpp
parent74b9c2b7a055be043e449b3907059e5d2e5b49ed (diff)
downloadtmwa-1886d63ef5986a3e613b4880dc7ae00636435e0a.tar.gz
tmwa-1886d63ef5986a3e613b4880dc7ae00636435e0a.tar.bz2
tmwa-1886d63ef5986a3e613b4880dc7ae00636435e0a.tar.xz
tmwa-1886d63ef5986a3e613b4880dc7ae00636435e0a.zip
add gm automod tool
Diffstat (limited to 'src/map/script-fun.cpp')
-rw-r--r--src/map/script-fun.cpp4
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_);
}