diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-12-17 23:41:02 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-12-17 23:41:02 +0000 |
commit | 1711d9e803b126c7863eef26691318592faafbf0 (patch) | |
tree | ab7d9656cfc848d88143bd985e947b3bb3b2c78c /src/map | |
parent | 934f4af797ab3f35c249cc70a1631696328f16d0 (diff) | |
download | hercules-1711d9e803b126c7863eef26691318592faafbf0.tar.gz hercules-1711d9e803b126c7863eef26691318592faafbf0.tar.bz2 hercules-1711d9e803b126c7863eef26691318592faafbf0.tar.xz hercules-1711d9e803b126c7863eef26691318592faafbf0.zip |
* Fixed a crash, when script command 'doevent' is called without an attached player (bugreport:3973).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14601 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script.c | 9 |
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; } /*========================================== |