GunChleoc has proposed merging 
lp:~widelands-dev/widelands/bug-1734748-savegame-filename into lp:widelands.

Commit message:
Fixed pointer corruption with filename when saving a game twice (Patch by Jukka 
Pakarinen (flegu)).

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1734748 in widelands: "Saving a game a second time causes a crash"
  https://bugs.launchpad.net/widelands/+bug/1734748

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1734748-savegame-filename/+merge/334429
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1734748-savegame-filename into lp:widelands.
=== modified file 'src/wui/game_main_menu_save_game.cc'
--- src/wui/game_main_menu_save_game.cc	2017-11-05 19:59:33 +0000
+++ src/wui/game_main_menu_save_game.cc	2017-11-29 08:10:35 +0000
@@ -132,8 +132,8 @@
 	ok_.set_enabled(load_or_save_.table().selections().size() == 1);
 	load_or_save_.delete_button()->set_enabled(load_or_save_.has_selection());
 	if (load_or_save_.has_selection()) {
-		const SavegameData& gamedata = *load_or_save_.entry_selected();
-		filename_editbox_.set_text(FileSystem::filename_without_ext(gamedata.filename.c_str()));
+		std::unique_ptr<SavegameData> gamedata = load_or_save_.entry_selected();
+		filename_editbox_.set_text(FileSystem::filename_without_ext(gamedata->filename.c_str()));
 	}
 }
 

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to