Skip to content

Commit 5888f38

Browse files
committed
Fix ctrl nil access in _SetFieldVisible for RmlUi mode
RmlUi fields don't have .ctrl property (they're not Chili controls). Added nil check in _SetFieldVisible() to skip visibility operations when ctrl doesn't exist. Fixes: attempt to index local 'ctrl' (a nil value) at editor.lua:290
1 parent 5741084 commit 5888f38

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎scen_edit/view/editor.lua‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,12 @@ function Editor:_SetFieldVisible(name, visible)
285285
return
286286
end
287287

288+
-- Skip in RmlUi mode - fields don't have Chili controls
288289
local ctrl = field.ctrl
290+
if not ctrl then
291+
return
292+
end
293+
289294
--if ctrl.visible ~= visible then
290295
if ctrl._visible ~= visible then
291296
if visible then

0 commit comments

Comments
 (0)