summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-08-07 14:44:06 -0300
committerJesusaves <cpntb1@ymail.com>2020-08-07 14:44:06 -0300
commitadf6cb66bd706f1283ddc9512568aa432d7598bd (patch)
treee659aaf83fc8d52af24daa9ac4866d1ffd1cbe9a
parenta22e3af8232b2e72e2c610339b3fd4fc9a0693e9 (diff)
downloadevol-hercules-adf6cb66bd706f1283ddc9512568aa432d7598bd.tar.gz
evol-hercules-adf6cb66bd706f1283ddc9512568aa432d7598bd.tar.bz2
evol-hercules-adf6cb66bd706f1283ddc9512568aa432d7598bd.tar.xz
evol-hercules-adf6cb66bd706f1283ddc9512568aa432d7598bd.zip
Patch
-rw-r--r--src/emap/battle.c6
1 files changed, 5 insertions, 1 deletions
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)