Skip to content

Commit

Permalink
fix memory leak when saving stamps
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Apr 21, 2018
1 parent 6731fa1 commit 9211fab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gui/game/GameController.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 9211fab

Please sign in to comment.