summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;