summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/status.c')
-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;