From 4515016da8172c577e2c20edf915b6759f289b03 Mon Sep 17 00:00:00 2001 From: sapier Date: Wed, 22 Jan 2014 23:13:41 +0100 Subject: [PATCH] Fix crash on invalid path selection --- mobf/path.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mobf/path.lua b/mobf/path.lua index b70eb6f..e3f624e 100644 --- a/mobf/path.lua +++ b/mobf/path.lua @@ -516,7 +516,8 @@ function mobf_path.show_manage_menu(playername,data) local all_paths = mobf_path.get_pathlist(playername,isadmin) mobf_print("data: " .. dump(data)) - if data.selected_path ~= nil then + if data.selected_path ~= nil and + all_paths[data.selected_path] ~= nil then data.pathname = all_paths[data.selected_path].pathname data.ownername = all_paths[data.selected_path].ownername end