From 8cc47f53632da1b8f133d3e33cc80b5d53bfb7c3 Mon Sep 17 00:00:00 2001 From: uramer Date: Wed, 10 Jan 2024 23:05:13 +0100 Subject: [PATCH] Only allow menu scripts to register permanent groups --- files/data/scripts/omw/settings/menu.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/data/scripts/omw/settings/menu.lua b/files/data/scripts/omw/settings/menu.lua index d20d75bf30..87c3dc6e6a 100644 --- a/files/data/scripts/omw/settings/menu.lua +++ b/files/data/scripts/omw/settings/menu.lua @@ -493,6 +493,9 @@ return { end, registerRenderer = registerRenderer, registerGroup = function(options) + if not options.permanentStorage then + error('Menu scripts are only allowed to register setting groups with permanentStorage = true') + end common.registerGroup(options) menuGroups[options.key] = true end,