Fix memory leak when the created cel is not used in ExpandCelCanvas

This commit is contained in:
David Capello 2022-06-14 23:25:10 -03:00
parent 4aa5fedfec
commit af74f8bc84

View File

@ -182,6 +182,11 @@ void ExpandCelCanvas::commit()
// And finally we add the cel again in the layer.
m_transaction.execute(new cmd::AddCel(m_layer, m_cel));
}
else {
// Delete unused cel
delete m_cel;
m_cel = nullptr;
}
}
// We are selecting inside a layer group...
else {