fixed bug causing gui scripts to fail when sidebar is closed

develop
ThiagoLira 2018-04-04 17:42:46 -03:00
parent 573fcb4bd0
commit b7bd88352e
1 changed files with 1 additions and 0 deletions

@ -109,6 +109,7 @@ local function parse_inset(inset)
end end
function inset_frame(rect, inset, gap) function inset_frame(rect, inset, gap)
if not rect then return mkdims_wh(0, 0, 0, 0) end
gap = gap or 0 gap = gap or 0
local l,t,r,b = parse_inset(inset) local l,t,r,b = parse_inset(inset)
return mkdims_xy(rect.x1+l+gap, rect.y1+t+gap, rect.x2-r-gap, rect.y2-b-gap) return mkdims_xy(rect.x1+l+gap, rect.y1+t+gap, rect.x2-r-gap, rect.y2-b-gap)