From f419f66546b72ed265a5a4dc96569aeee8880d7a Mon Sep 17 00:00:00 2001 From: sapier Date: Mon, 8 Jul 2013 21:02:42 +0200 Subject: fix crash on play/start with empty world list make enter button work in create world dialog --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 02bffa84d..580260ade 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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: "<