summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-31 21:26:10 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-31 21:26:10 +0000
commitfe158936e4adf4c89a8bc14423ad686f645e3b9f (patch)
treebd04bf3e3b0533b79d7e737f050ba4bd7f50ca30 /src/map
parent974d5f00d76252ac6336e5432f91c3edb42548a9 (diff)
downloadhercules-fe158936e4adf4c89a8bc14423ad686f645e3b9f.tar.gz
hercules-fe158936e4adf4c89a8bc14423ad686f645e3b9f.tar.bz2
hercules-fe158936e4adf4c89a8bc14423ad686f645e3b9f.tar.xz
hercules-fe158936e4adf4c89a8bc14423ad686f645e3b9f.zip
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
Diffstat (limited to 'src/map')
-rw-r--r--src/map/status.c11
1 files 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;