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.
This commit is contained in:
Vlad Zahorodnii 2020-12-20 17:27:54 +02:00
parent 38f55c81f3
commit d70e6c2c69

View file

@ -70,7 +70,7 @@ void ColorManager::handleOutputDisabled(AbstractOutput *output)
ColorDevice *device = *it;
d->devices.erase(it);
emit deviceRemoved(device);
delete *it;
delete device;
}
} // namespace KWin