diff options
Diffstat (limited to 'plugins/Clist_modern/src/modern_xptheme.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_xptheme.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/Clist_modern/src/modern_xptheme.cpp b/plugins/Clist_modern/src/modern_xptheme.cpp index 6122fa21f6..bff9e8a7fb 100644 --- a/plugins/Clist_modern/src/modern_xptheme.cpp +++ b/plugins/Clist_modern/src/modern_xptheme.cpp @@ -72,14 +72,12 @@ void xpt_FreeThemeHandle(XPTHANDLE xptHandle) void xpt_FreeThemeForWindow(HWND hwnd)
{
mir_cslock lck(xptCS);
- for (int i = 0; i < xptObjectList.getCount();) {
- XPTObject& xptObject = xptObjectList[i];
- if (xptObject.hOwnerWindow == hwnd) {
- _sttXptCloseThemeData(&xptObject);
- xptObjectList.remove(i);
+ auto T = xptObjectList.rev_iter();
+ for (auto &xptObject : T)
+ if (xptObject->hOwnerWindow == hwnd) {
+ _sttXptCloseThemeData(xptObject);
+ xptObjectList.remove(T.indexOf(&xptObject));
}
- else i++;
- }
}
void xpt_OnWM_THEMECHANGED()
|