mirror of
https://github.com/KDE/konsole.git
synced 2026-06-11 23:45:09 -04:00
Fix problems discovered by coverity (and more):
- Better handling of data pointer and errors for compressed data in kitty protocol - Correct handling of iterator when erasing a placement. - Use midRef() instead of mid().
This commit is contained in:
committed by
Kurt Hindenburg
parent
1341088b8b
commit
d28359124b
@@ -1979,8 +1979,7 @@ void Screen::scrollUpVisiblePlacements(int n)
|
||||
|
||||
void Screen::delPlacements(int del, qint64 id, qint64 pid, int x, int y, int z)
|
||||
{
|
||||
std::vector<std::unique_ptr<TerminalGraphicsPlacement_t>>::iterator i;
|
||||
i = _graphicsPlacements.begin();
|
||||
auto i = _graphicsPlacements.begin();
|
||||
while (i != _graphicsPlacements.end()) {
|
||||
TerminalGraphicsPlacement_t *placement = i->get();
|
||||
bool remove = false;
|
||||
@@ -2026,7 +2025,7 @@ void Screen::delPlacements(int del, qint64 id, qint64 pid, int x, int y, int z)
|
||||
break;
|
||||
}
|
||||
if (remove) {
|
||||
_graphicsPlacements.erase(i);
|
||||
i = _graphicsPlacements.erase(i);
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user