X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Fioncore_tabnum.lua;h=24f8a18c88f7fe07e10c267fdd5fefa4b469d925;hp=e9161b892e19c6062bc2eade233e18fbb6681cf5;hb=HEAD;hpb=ae4260bb64817c11f9a7140324cd3e3ba113e297 diff --git a/ioncore/ioncore_tabnum.lua b/ioncore/ioncore_tabnum.lua index e9161b8..24f8a18 100644 --- a/ioncore/ioncore_tabnum.lua +++ b/ioncore/ioncore_tabnum.lua @@ -1,7 +1,7 @@ -- -- ion/share/ioncore_tabnum.lua -- Ioncore tab numbering support -- --- Copyright (c) Tuomo Valkonen 2007. +-- Copyright (c) Tuomo Valkonen 2007-2009. -- -- See the included file LICENSE for details. -- @@ -11,8 +11,12 @@ ioncore.tabnum={} local framestate={} local function do_show(frame) - frame:set_grattr('numbered', 'set') - framestate[frame]='set' + if obj_exists(frame) then + frame:set_grattr('numbered', 'set') + framestate[frame]='set' + else + framestate[frame]=nil + end end --DOC @@ -38,7 +42,9 @@ function ioncore.tabnum.clear() for f, s in pairs(st) do if s=='set' then - f:set_grattr('numbered', 'unset') + if obj_exists(f) then + f:set_grattr('numbered', 'unset') + end elseif obj_is(s, "WTimer") then s:reset() end