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:
parent
38f55c81f3
commit
d70e6c2c69
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue