summaryrefslogtreecommitdiff
path: root/src/mir_app/src/extraicons.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir_app/src/extraicons.cpp')
-rw-r--r--src/mir_app/src/extraicons.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mir_app/src/extraicons.cpp b/src/mir_app/src/extraicons.cpp
index 937b5e61a8..6428fc4b11 100644
--- a/src/mir_app/src/extraicons.cpp
+++ b/src/mir_app/src/extraicons.cpp
@@ -196,13 +196,12 @@ MIR_APP_DLL(void) KillModuleExtraIcons(int _hLang)
{
LIST<ExtraIcon> arDeleted(1);
- for (int i = registeredExtraIcons.getCount() - 1; i >= 0; i--) {
- BaseExtraIcon *p = registeredExtraIcons[i];
- if (p->m_hLangpack == _hLang) {
- registeredExtraIcons.remove(i);
- arDeleted.insert(p);
+ auto T = registeredExtraIcons.rev_iter();
+ for (auto &it : T)
+ if (it->m_hLangpack == _hLang) {
+ arDeleted.insert(it);
+ registeredExtraIcons.remove(T.indexOf(&it));
}
- }
if (arDeleted.getCount() == 0)
return;