summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/script-fun.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index 98c07ed..8ec0d4a 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -4252,9 +4252,9 @@ void builtin_npctalk(ScriptState *st)
dumb_ptr<npc_data> nd;
RString str = conv_str(st, &AARG(1));
- dumb_ptr<npc_data> nd_ = npc_name2id(stringish<NpcName>(ZString(conv_str(st, &AARG(0)))));
- assert (nd_ && nd_->npc_subtype == NpcSubtype::SCRIPT);
- nd = nd_->is_script();
+ nd = npc_name2id(stringish<NpcName>(ZString(conv_str(st, &AARG(0)))));
+ if (nd == nullptr)
+ return;
if(HARG(2)){