summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 00b04dc0c..e1d34d7e0 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -351,7 +351,7 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
status_change_end(target, SC_CRYSTALIZE, INVALID_TIMER);
}
}
- if( src->type == BL_PC ){
+ if( src && src->type == BL_PC ){
struct map_session_data *sd = BL_CAST(BL_PC, src);
int s;
@@ -360,7 +360,7 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
if( s < 5 && atk_elem == s )
ratio += sd->talisman[s] * 2; // +2% custom value
}
- if( target->type == BL_PC ) {
+ if( target && target->type == BL_PC ) {
struct map_session_data *tsd = BL_CAST(BL_PC, target);
int t;