From fe158936e4adf4c89a8bc14423ad686f645e3b9f Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 31 May 2012 21:26:10 +0000 Subject: a couple checks here and there to remove possible warnings. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16190 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/status.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/map/status.c b/src/map/status.c index 0d89f0118..39304aa3b 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -8690,7 +8690,8 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const if (sce->val4) { //Clear the group. struct skill_unit_group* group = skill_id2group(sce->val4); sce->val4 = 0; - skill_delunitgroup(group); + if( group ) /* might have been cleared before status ended, e.g. land protector */ + skill_delunitgroup(group); } break; case SC_KAAHI: @@ -8773,18 +8774,18 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const break; case SC_NEUTRALBARRIER_MASTER: case SC_STEALTHFIELD_MASTER: - if( sce->val2 ) - { + if( sce->val2 ) { struct skill_unit_group* group = skill_id2group(sce->val2); sce->val2 = 0; - skill_delunitgroup(group); + if( group ) /* might have been cleared before status ended, e.g. land protector */ + skill_delunitgroup(group); } break; case SC_BANDING: if(sce->val4) { struct skill_unit_group *group = skill_id2group(sce->val4); sce->val4 = 0; - if( group ) + if( group ) /* might have been cleared before status ended, e.g. land protector */ skill_delunitgroup(group); } break; -- cgit v1.2.3-70-g09d2