summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
author(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-29 06:36:59 +0000
committer(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-29 06:36:59 +0000
commit7f6f823834ec15931921693be1fd519d1e9efb49 (patch)
tree95be1bfe695d82dfd7a96d5d005373792f2dd3cc /src/map/battle.c
parent6e9d4a60f5cb561b72a9e0200ef4734826fb44c9 (diff)
downloadhercules-7f6f823834ec15931921693be1fd519d1e9efb49.tar.gz
hercules-7f6f823834ec15931921693be1fd519d1e9efb49.tar.bz2
hercules-7f6f823834ec15931921693be1fd519d1e9efb49.tar.xz
hercules-7f6f823834ec15931921693be1fd519d1e9efb49.zip
* Added a crash check to Safety Wall
* Added some optimisations in clif_parse_MapMove git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1012 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 3be28ecbc..128ede1a8 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -258,7 +258,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
struct skill_unit *unit;
unit = map_find_skill_unit_oncell(bl->m,bl->x,bl->y,MG_SAFETYWALL);
if (unit) {
- if ((--unit->group->val2)<=0)
+ if (unit->group && (--unit->group->val2)<=0)
skill_delunit(unit);
damage=0;
} else {