summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/eventpopups.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-15 15:33:54 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-15 15:34:09 +0300
commit44b60862c97e5ec855d2bacd4d15f81f7ae7f410 (patch)
treecfe6fd232fac8c80c2f7673804352b94187d698b /plugins/TabSRMM/src/eventpopups.cpp
parent0a03c7c9ccd36ce03bdb9feb4827314e4dd553c6 (diff)
MUCH more effective way of removing records from iterators
Diffstat (limited to 'plugins/TabSRMM/src/eventpopups.cpp')
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index b1759de869..8dff9716bb 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -54,13 +54,14 @@ static PLUGIN_DATAT* PU_GetByContact(const MCONTACT hContact)
*/
static void PU_CleanUp()
{
- for (auto &p : arPopupList.rev_iter()) {
+ auto T = arPopupList.rev_iter();
+ for (auto &p : T) {
if (p->hContact != 0)
continue;
mir_free(p->eventData);
mir_free(p);
- arPopupList.remove(p);
+ arPopupList.remove(T.indexOf(&p));
}
}