diff options
author | gumi <git@gumi.ca> | 2019-04-12 12:12:38 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2019-04-15 11:58:44 -0400 |
commit | 1886d63ef5986a3e613b4880dc7ae00636435e0a (patch) | |
tree | 33da7b7c6e40eda3150da361038c668b546986d2 /src/map/script-fun.cpp | |
parent | 74b9c2b7a055be043e449b3907059e5d2e5b49ed (diff) | |
download | tmwa-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.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_); } |