Commit 0820678
committed
Add guards for field operations in RmlUi mode
Fixed more editor errors when fields don't have Chili methods:
Editor.lua fixes:
- _AddField: Guard against nil field or missing field.name
- Set: Guard against nil field, make Set() method optional
- Update: Make Update() method optional (only exists on Chili fields)
object_property_window.lua fix:
- Guard stackPanel access when bridge is nil
These changes allow editors to work with simple field tables in RmlUi mode:
- Fields can be added without Chili methods
- editor:Set() works with both Chili fields and plain tables
- editor:Update() doesn't crash on plain field tables
- No more crashes when editors instantiate1 parent 7fdffe5 commit 0820678
2 files changed
+23
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
363 | 367 | | |
364 | 368 | | |
365 | 369 | | |
| |||
416 | 420 | | |
417 | 421 | | |
418 | 422 | | |
419 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
420 | 434 | | |
421 | 435 | | |
422 | 436 | | |
423 | 437 | | |
424 | 438 | | |
425 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
426 | 443 | | |
427 | 444 | | |
428 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | | - | |
572 | | - | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
573 | 575 | | |
574 | 576 | | |
575 | 577 | | |
| |||
0 commit comments