summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 7f33c26a5..554528af2 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -15327,7 +15327,9 @@ bool skill_check_shadowform(struct block_list *bl, int64 damage, int hit){
}
status->damage(bl, src, damage, 0, clif->damage(src, src, 500, 500, damage, hit, (hit > 1 ? 8 : 0), 0), 0);
- if( (--sc->data[SC__SHADOWFORM]->val3) <= 0 ) {
+
+ /* because damage can cancel it */
+ if( sc->data[SC__SHADOWFORM] && (--sc->data[SC__SHADOWFORM]->val3) <= 0 ) {
status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
if( src->type == BL_PC )
((TBL_PC*)src)->shadowform_id = 0;