Fix crash loading null stamp after pasting (http://powdertoy.co.uk/Discussions/Thread/View.html?Thread=15107)
This commit is contained in:
parent
ef24a1ad44
commit
2e99638d76
@ -752,11 +752,14 @@ void GameModel::SetStamp(GameSave * save)
|
||||
void GameModel::SetPlaceSave(GameSave * save)
|
||||
{
|
||||
if(save != placeSave)
|
||||
delete placeSave;
|
||||
if(save != placeSave)
|
||||
placeSave = new GameSave(*save);
|
||||
else if(!save)
|
||||
placeSave = NULL;
|
||||
{
|
||||
if(placeSave)
|
||||
delete placeSave;
|
||||
if(save)
|
||||
placeSave = new GameSave(*save);
|
||||
else
|
||||
placeSave = NULL;
|
||||
}
|
||||
notifyPlaceSaveChanged();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user