summaryrefslogtreecommitdiff
path: root/plugins/HistorySweeperLight
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HistorySweeperLight')
-rw-r--r--plugins/HistorySweeperLight/src/historysweeperlight.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/HistorySweeperLight/src/historysweeperlight.cpp b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
index 65c37b0196..62a6f3b102 100644
--- a/plugins/HistorySweeperLight/src/historysweeperlight.cpp
+++ b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
@@ -224,9 +224,10 @@ int OnWindowEvent(WPARAM, LPARAM lParam)
SweepHistoryFromContact(msgEvData->hContact, Criteria, TRUE);
}
- for (auto &it : g_hWindows.rev_iter())
+ auto T = g_hWindows.rev_iter();
+ for (auto &it : T)
if (it == PVOID(msgEvData->hContact))
- g_hWindows.remove(it);
+ g_hWindows.remove(T.indexOf(&it));
break;
}