X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ioncore%2Fioncore_tabnum.lua;h=2a3cbadb93061a2bf2a663f4eff058070e562c22;hb=3102bb90c325d9b29ac304d8f3ea0a17df564fc8;hp=e9161b892e19c6062bc2eade233e18fbb6681cf5;hpb=ae4260bb64817c11f9a7140324cd3e3ba113e297;p=ion3.git diff --git a/ioncore/ioncore_tabnum.lua b/ioncore/ioncore_tabnum.lua index e9161b8..2a3cbad 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-2008. -- -- 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