summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-02 01:22:28 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-02 01:22:28 +0000
commitcdffb7ceb30953ecec67e9e7faa6f3649da07634 (patch)
treefc70f5c05dadeb5f969aa4e2a36fd1330b1551d6
parentd9d6d28182bd91f0dcdffb4398d1b845dea581b3 (diff)
downloadhercules-cdffb7ceb30953ecec67e9e7faa6f3649da07634.tar.gz
hercules-cdffb7ceb30953ecec67e9e7faa6f3649da07634.tar.bz2
hercules-cdffb7ceb30953ecec67e9e7faa6f3649da07634.tar.xz
hercules-cdffb7ceb30953ecec67e9e7faa6f3649da07634.zip
- Corrected a crash when sd is null in npc_event
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6440 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/npc.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 0c0142939..2c51fc950 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/01
+ * Corrected a crash when sd is null in npc_event [Skotlex]
* After testing to make sure it works properly, I'm including
new battle conf options to limit MVP drops. [Reddozen]
* Removed OPTION_XMAS, it seems to not exist.... [Skotlex]
diff --git a/src/map/npc.c b/src/map/npc.c
index 12c17de7a..e294f881b 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -822,8 +822,10 @@ int npc_event (struct map_session_data *sd, const unsigned char *eventname, int
int xs,ys;
unsigned char mobevent[100];
- if (sd == NULL)
+ if (sd == NULL) {
nullpo_info(NLP_MARK);
+ return 0;
+ }
if (ev == NULL && eventname && strcmp(((eventname)+strlen(eventname)-9),"::OnTouch") == 0)
return 1;