mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
* Fix crashing bug in event vector cleanup
* Fix warnings in settings.cpp * Add settings to ui of powertoys
This commit is contained in:
@@ -53,16 +53,16 @@ IFACEMETHODIMP CPowerRenameRegEx::UnAdvise(_In_ DWORD cookie)
|
||||
HRESULT hr = E_FAIL;
|
||||
CSRWExclusiveAutoLock lock(&m_lockEvents);
|
||||
|
||||
for (auto it : m_renameRegExEvents)
|
||||
for (std::vector<RENAME_REGEX_EVENT>::iterator it = m_renameRegExEvents.begin(); it != m_renameRegExEvents.end(); ++it)
|
||||
{
|
||||
if (it.cookie == cookie)
|
||||
if (it->cookie == cookie)
|
||||
{
|
||||
hr = S_OK;
|
||||
it.cookie = 0;
|
||||
if (it.pEvents)
|
||||
it->cookie = 0;
|
||||
if (it->pEvents)
|
||||
{
|
||||
it.pEvents->Release();
|
||||
it.pEvents = nullptr;
|
||||
it->pEvents->Release();
|
||||
it->pEvents = nullptr;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user