Commit 728e2d72 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix use after free

removeResourceAndBlacklist frees cs, so we shouldn't access it

CID:248787
parent fd14bc4e
......@@ -182,8 +182,8 @@ void KisPaletteEditor::removePalette(KoColorSet *cs)
}
if (cs->isGlobal()) {
m_d->rServer->removeResourceAndBlacklist(cs);
QFile::remove(cs->filename());
m_d->rServer->removeResourceAndBlacklist(cs);
return;
}
m_d->rServer->removeResourceFromServer(cs);
......
Markdown is supported
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