mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-03-21 14:49:54 +01:00
fix memory leak when saving stamps
This commit is contained in:
parent
6731fa16b7
commit
9211fab9f7
@ -584,6 +584,7 @@ std::string GameController::StampRegion(ui::Point point1, ui::Point point2, bool
|
||||
{
|
||||
newSave->paused = gameModel->GetPaused();
|
||||
std::string stampName = Client::Ref().AddStamp(newSave);
|
||||
delete newSave;
|
||||
if (stampName.length() == 0)
|
||||
new ErrorMessage("Could not create stamp", "Error serializing save file");
|
||||
return stampName;
|
||||
|
Loading…
x
Reference in New Issue
Block a user