From ac131bf1baa9a8f9a87176beadf1ce4ebd8abb01 Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 19 Aug 2013 22:38:24 +0200 Subject: Fixed a crash in case a clone uses SO_ELEMENTAL_SHIELD Signed-off-by: Haru --- src/map/skill.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index fb8bbad3d..1b732baaa 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8966,11 +8966,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui break; case SO_ELEMENTAL_SHIELD: - if( !sd->ed ) break; + if( sd == NULL || !sd->ed ) + break; elemental->delete(sd->ed, 0); - if( sd == NULL || sd->status.party_id == 0 || flag&1 ) + if( sd->status.party_id == 0 || flag&1 ) skill->unitsetting(src,MG_SAFETYWALL,skill_lv,bl->x,bl->y,0); - else if( sd ) + else party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id); break; -- cgit v1.2.3-70-g09d2