summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 04cb0593b..3da635bf5 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7848,8 +7848,15 @@ BUILDIN_FUNC(clone)
BUILDIN_FUNC(doevent)
{
const char* event = script_getstr(st,2);
+ struct map_session_data* sd;
+
+ if( ( sd = script_rid2sd(st) ) == NULL )
+ {
+ return 0;
+ }
+
check_event(st, event);
- npc_event(map_id2sd(st->rid),event,0);
+ npc_event(sd, event, 0);
return 0;
}
/*==========================================