← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1508117 into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1508117 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1508117 in widelands: "New game menu can trigger assert"
  https://bugs.launchpad.net/widelands/+bug/1508117

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1508117/+merge/275079

Fixed a crash in load/save map dialogs.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1508117 into lp:widelands.
=== modified file 'src/editor/ui_menus/editor_main_menu_load_or_save_map.cc'
--- src/editor/ui_menus/editor_main_menu_load_or_save_map.cc	2015-10-17 19:57:42 +0000
+++ src/editor/ui_menus/editor_main_menu_load_or_save_map.cc	2015-10-20 17:43:39 +0000
@@ -211,5 +211,9 @@
 	}
 
 	table_.fill(maps_data_, display_type);
-	ok_.set_enabled(false);
+	if (table_.size() > 0) {
+		table_.select(0);
+	} else {
+		ok_.set_enabled(false);
+	}
 }

=== modified file 'src/ui_fsmenu/mapselect.cc'
--- src/ui_fsmenu/mapselect.cc	2015-10-17 19:57:42 +0000
+++ src/ui_fsmenu/mapselect.cc	2015-10-20 17:43:39 +0000
@@ -376,6 +376,11 @@
 		}
 	}
 	table_.fill(maps_data_, display_type);
+	if (table_.size() > 0) {
+		table_.select(0);
+	} else {
+		ok_.set_enabled(false);
+	}
 }
 
 /*


Follow ups