summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TopToolBar')
-rw-r--r--plugins/TopToolBar/src/toolbar.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp
index de6755c5d8..380daf02dd 100644
--- a/plugins/TopToolBar/src/toolbar.cpp
+++ b/plugins/TopToolBar/src/toolbar.cpp
@@ -550,9 +550,9 @@ int OnPluginUnload(WPARAM, LPARAM lParam)
bool bNeedUpdate = false;
mir_cslock lck(csButtonsHook);
- for (int i = Buttons.getCount() - 1; i >= 0; i--)
- if (Buttons[i]->hLangpack == lang) {
- TTBRemoveButton(Buttons[i]->id, 0);
+ for (auto &it : Buttons.rev_iter())
+ if (it->hLangpack == lang) {
+ TTBRemoveButton(it->id, 0);
bNeedUpdate = true;
}