From adf6cb66bd706f1283ddc9512568aa432d7598bd Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 7 Aug 2020 14:44:06 -0300 Subject: Patch --- src/emap/battle.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/emap/battle.c b/src/emap/battle.c index abc38a5..e8eed18 100644 --- a/src/emap/battle.c +++ b/src/emap/battle.c @@ -173,7 +173,11 @@ struct Damage ebattle_calc_magic_attack_post(struct Damage retVal, sd = BL_CAST(BL_PC, src); tsd = BL_CAST(BL_PC, target); - //Skip checking as there are no status changes active. + // Skip if things went wrong + if (sd == NULL || tsd == NULL) + return retVal; + + // Skip checking as there are no status changes active. if (sc && !sc->count) sc = NULL; if (tsc && !tsc->count) -- cgit v1.2.3-60-g2f50