Skip to content

Commit

Permalink
widgethandler: varname fix (#4230)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruwetuin authored Jan 26, 2025
1 parent bac0433 commit 826c732
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions luaui/barwidgets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -451,16 +451,16 @@ function widgetHandler:LoadWidget(filename, fromZip, enableLocalsAccess)

local widget = widgetHandler:NewWidget()
setfenv(chunk, widget)
local success, valOrErr = pcall(chunk)
local success, err = pcall(chunk)
if not success then
Spring.Echo('Failed to load: ' .. basename .. ' (' .. valOrErr .. ')')
Spring.Echo('Failed to load: ' .. basename .. ' (' .. err .. ')')
return nil
end
if err == false then
return nil -- widget asked for a silent death
end

local localsNames = valOrErr
local localsNames = err

text = text .. localsAccess.generateLocalsAccessStr(localsNames)
end
Expand Down Expand Up @@ -1573,7 +1573,7 @@ function widgetHandler:DrawPreDecals()
end

function widgetHandler:DrawWorldPreParticles()
-- NOTE: This is called TWICE per draw frame, once before water and once after, even if no water is present. The second is the refraction pass.
-- NOTE: This is called TWICE per draw frame, once before water and once after, even if no water is present. The second is the refraction pass.
tracy.ZoneBeginN("W:DrawWorldPreParticles")
for _, w in r_ipairs(self.DrawWorldPreParticlesList) do
w:DrawWorldPreParticles()
Expand Down

0 comments on commit 826c732

Please sign in to comment.