summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-26 23:43:41 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-26 23:43:41 +0000
commit77b17b6830361e4b86536c238cfe929adc00414e (patch)
tree7e2b3537949dae52e8478ba9d41aebce8e135727 /src
parent40ca2d562ca42e5030349975cde15a9dd30b3771 (diff)
downloadhercules-77b17b6830361e4b86536c238cfe929adc00414e.tar.gz
hercules-77b17b6830361e4b86536c238cfe929adc00414e.tar.bz2
hercules-77b17b6830361e4b86536c238cfe929adc00414e.tar.xz
hercules-77b17b6830361e4b86536c238cfe929adc00414e.zip
And another possible crash
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6783 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/mob.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 1e2d7c14e..f3afa4d1b 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2182,8 +2182,8 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
if(md->nd){
setd_sub(NULL, NULL, ".ai_action", 0, (void *)(int)3, &md->nd->u.scr.script->script_vars);
- setd_sub(NULL, NULL, ".ai_action", 1, (void *)(int)src->type, &md->nd->u.scr.script->script_vars);
- setd_sub(NULL, NULL, ".ai_action", 2, (void *)src->id, &md->nd->u.scr.script->script_vars);
+ setd_sub(NULL, NULL, ".ai_action", 1, (void *)(int)(src?src->type:0), &md->nd->u.scr.script->script_vars);
+ setd_sub(NULL, NULL, ".ai_action", 2, (void *)(src?src->id:0), &md->nd->u.scr.script->script_vars);
setd_sub(NULL, NULL, ".ai_action", 3, (void *)md->bl.id, &md->nd->u.scr.script->script_vars);
run_script(md->nd->u.scr.script, 0, 0, md->nd->bl.id);
} else if(md->npc_event[0]){