mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 10:21:04 +00:00
Fix memory leak when the created cel is not used in ExpandCelCanvas
This commit is contained in:
parent
4aa5fedfec
commit
af74f8bc84
@ -182,6 +182,11 @@ void ExpandCelCanvas::commit()
|
|||||||
// And finally we add the cel again in the layer.
|
// And finally we add the cel again in the layer.
|
||||||
m_transaction.execute(new cmd::AddCel(m_layer, m_cel));
|
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...
|
// We are selecting inside a layer group...
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user