Commit a803d10
committed
Fix RmlUi mode detection in MainWindowPanel
The check 'SB.view and SB.view.useRmlUi' failed during initialization
because SB.view isn't assigned until AFTER View() constructor completes.
Timeline:
1. View:InitializeRmlUi() runs (inside View constructor)
2. Creates TabbedWindow which calls MainWindowPanel:AddElement()
3. SB.view is STILL NIL (not assigned yet)
4. Check fails, goes to Chili mode path
5. But editors are RmlUi editors (field compat loaded)
6. RmlUi editors don't have .window → crash
Fix: Detect RmlUi mode by checking if RmlUiStringField exists
(which it will if field compat layer is loaded).
Fixes: attempt to index field 'window' (a nil value) at line 1311 parent 36d9a1a commit a803d10
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
97 | 101 | | |
98 | | - | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| |||
0 commit comments