1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

fix crash on play/start with empty world list

make enter button work in create world dialog
This commit is contained in:
sapier 2013-07-08 21:02:42 +02:00 committed by kwolekr
parent fca4610f11
commit f419f66546
2 changed files with 12 additions and 2 deletions

View file

@ -1667,7 +1667,8 @@ int main(int argc, char *argv[])
}
// Set world path to selected one
if(menudata.selected_world != -1){
if ((menudata.selected_world >= 0) &&
(menudata.selected_world < worldspecs.size())) {
worldspec = worldspecs[menudata.selected_world];
infostream<<"Selected world: "<<worldspec.name
<<" ["<<worldspec.path<<"]"<<std::endl;