X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=mod_menu%2Fmod_menu.lua;h=913ad1618673adc04d6671e86d3581249afed9da;hp=6375e9f76423ada9fe59e9c9f70053810b516d8f;hb=803afbc1cd633f6c025bcd9537e9b7e9aedadd0d;hpb=8366314611bf30a0f31d25bf5f5023186fa87692 diff --git a/mod_menu/mod_menu.lua b/mod_menu/mod_menu.lua index 6375e9f..913ad16 100644 --- a/mod_menu/mod_menu.lua +++ b/mod_menu/mod_menu.lua @@ -1,7 +1,7 @@ -- -- ion/mod_menu/mod_menu.lua -- Menu opening helper routines. -- --- Copyright (c) Tuomo Valkonen 2004-2006. +-- Copyright (c) Tuomo Valkonen 2004-2007. -- -- Ion is free software; you can redistribute it and/or modify it under -- the terms of the GNU Lesser General Public License as published by @@ -29,11 +29,11 @@ assert(mod_menu and menudb) local function menu_(reg, sub, menu_or_name, fn, check) if check then -- Check that no other menus are open in reg. - local l=reg:managed_list() - for i, r in pairs(l) do - if obj_is(r, "WMenu") then - return - end + local ok=reg:managed_i(function(r) + return not obj_is(r, "WMenu") + end) + if not ok then + return end end