Commit d70e6c2c authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Avoid destroying yet alive color devices

This is a typo that I forgot to fix, therefore not requesting code
review. After QVector::erase() has been called, we cannot use the
iterator as it will lead to undefined behavior.
parent 38f55c81
...@@ -70,7 +70,7 @@ void ColorManager::handleOutputDisabled(AbstractOutput *output) ...@@ -70,7 +70,7 @@ void ColorManager::handleOutputDisabled(AbstractOutput *output)
ColorDevice *device = *it; ColorDevice *device = *it;
d->devices.erase(it); d->devices.erase(it);
emit deviceRemoved(device); emit deviceRemoved(device);
delete *it; delete device;
} }
} // namespace KWin } // namespace KWin
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment