浏览代码

Fixed bugreport:6359

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16529 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 年之前
父节点
当前提交
c820682934
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/map/battle.c

+ 2 - 2
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;