Explorar el Código

Added missing check for pc_skillatk_bonus (#8710)

Follow-up https://github.com/rathena/rathena/commit/0551a5390ad51110c308082babd7e57f43b015d0#diff-e9da83c5add2e830d737c917e5a40115323bdd83189435c7bbc32534a7717213R8842
Atemo hace 7 meses
padre
commit
d3a4eb9fd8
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/map/battle.cpp

+ 1 - 1
src/map/battle.cpp

@@ -8839,7 +8839,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
 
 #ifdef RENEWAL
 		// pc_skillatk_bonus must be after def reduction and before the damages applied when the target is hit (at least on renewal)
-		if ((i = pc_skillatk_bonus(sd, skill_id)) > 0) {
+		if (sd != nullptr && (i = pc_skillatk_bonus(sd, skill_id)) > 0) {
 			ad.damage += (int64)ad.damage*i/100;
 		}
 #endif