From fd546694d8f26ab2760995512a06f4370a7f0b96 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 26 Jul 2012 02:37:58 +0000 Subject: Follow up r16502 / bugreport:6115 added missing check on battle_calc_gvg_damage git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16503 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/map/battle.c b/src/map/battle.c index 11efc70e0..6cc0ae044 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -916,10 +916,11 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama } if(src->type != BL_MOB) { struct guild *g = guild_search(status_get_guild_id(src)); - if (!g) return 0; - if (class_ == MOBID_EMPERIUM && guild_checkskill(g,GD_APPROVAL) <= 0) + + if (class_ == MOBID_EMPERIUM && (!g || guild_checkskill(g,GD_APPROVAL) <= 0 )) return 0; - if (battle_config.guild_max_castles && guild_checkcastles(g)>=battle_config.guild_max_castles) + + if (g && battle_config.guild_max_castles && guild_checkcastles(g)>=battle_config.guild_max_castles) return 0; // [MouseJstr] } } -- cgit v1.2.3-70-g09d2