From fd8cd4c8f3e2ab2be97acea3e3c7a9f525cd6515 Mon Sep 17 00:00:00 2001 From: Sanio46 Date: Wed, 28 Aug 2024 18:01:34 -0400 Subject: [PATCH] 2.1.3d...but again. --- src/save_manager.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/save_manager.lua b/src/save_manager.lua index e9aebf8..b645e8b 100644 --- a/src/save_manager.lua +++ b/src/save_manager.lua @@ -1104,8 +1104,10 @@ function SaveManager.Init(mod) modReference:AddPriorityCallback(ModCallbacks.MC_POST_SLOT_INIT, CallbackPriority.IMPORTANT, onEntityInit) modReference:AddPriorityCallback(ModCallbacks.MC_POST_SAVESLOT_LOAD, CallbackPriority.IMPORTANT, postSaveSlotLoad) modReference:AddPriorityCallback(ModCallbacks.MC_MENU_INPUT_ACTION, CallbackPriority.IMPORTANT, function() - dontSaveModData = MenuManager.GetActiveMenu() == MainMenuType.TITLE or - MenuManager.GetActiveMenu() == MainMenuType.MODS + local success, currentMenu = pcall(MenuManager.GetActiveMenu) + if not success then return end + dontSaveModData = currentMenu == MainMenuType.TITLE or + currentMenu == MainMenuType.MODS detectLuamod() end) else