summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-07-02 16:30:16 -0300
committerpanikon <panikon@zoho.com>2014-07-02 16:30:16 -0300
commit58746ca809fe202b9d5c2519941093744c34e68f (patch)
tree3ba817775a5a513da9298491d4f5bf15a449cd73
parent6a5386d1085d3e1333bcb6281f604efbd10e01aa (diff)
downloadhercules-58746ca809fe202b9d5c2519941093744c34e68f.tar.gz
hercules-58746ca809fe202b9d5c2519941093744c34e68f.tar.bz2
hercules-58746ca809fe202b9d5c2519941093744c34e68f.tar.xz
hercules-58746ca809fe202b9d5c2519941093744c34e68f.zip
Fixed issue of crash when using LG_SHIELDSPELL, issue: 8172 http://hercules.ws/board/tracker/issue-8172-mapserver-crash-skill-lg-shieldspell/
-rw-r--r--src/map/skill.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index b960ef119..19984bdbc 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8589,9 +8589,11 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case LG_SHIELDSPELL:
+ if( !sd )
+ break;
if( flag&1 ) {
sc_start(src,bl,SC_SILENCE,100,skill_lv,sd->bonus.shieldmdef * 30000);
- } else if( sd ) {
+ } else {
int opt = 0, val = 0, splashrange = 0;
struct item_data *shield_data = sd->inventory_data[sd->equip_index[EQI_HAND_L]];
if( !shield_data || shield_data->type != IT_ARMOR ) {