From 56e909438c6cf5011eb8ccdbcf0052d79de9d620 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 22 May 2006 14:38:18 +0000 Subject: - Fixed a possible null pointer in script command misc_effect - Modified Investigate to take into consideration final def/vit-def rather than base values for damage adjustment. - Added missing include unit.h in pet.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6695 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index 777714a84..319fc5d14 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8327,9 +8327,11 @@ int buildin_misceffect(struct script_state *st) int type; type=conv_num(st,& (st->stack->stack_data[st->start+2])); - if(st->oid) - clif_misceffect2(map_id2bl(st->oid),type); - else{ + if(st->oid) { + struct block_list *bl = map_id2bl(st->oid); + if (bl) + clif_misceffect2(bl,type); + } else{ struct map_session_data *sd=script_rid2sd(st); if(sd) clif_misceffect2(&sd->bl,type); -- cgit v1.2.3-70-g09d2