Fixed a map-server crash (#6223)

Fixes #6220

Thanks to @AsurielRO, @Atemo, @aleos89 and @vstumpf
This commit is contained in:
Lemongrass3110
2021-08-27 00:09:10 +02:00
committed by GitHub
parent 5a25755386
commit 21cb9e87a2

View File

@@ -19003,7 +19003,8 @@ void skill_clear_unitgroup(struct block_list *src)
nullpo_retv(ud);
for (auto it = ud->skillunits.begin(); it != ud->skillunits.end(); it++) {
// The after loop statement might look stupid, but this prevents iteration problems, if an entry was deleted
for (auto it = ud->skillunits.begin(); it != ud->skillunits.end(); it = ud->skillunits.begin()) {
skill_delunitgroup(*it);
}
}