Commit Graph
17 Commits
Author SHA1 Message Date
GabCoolGuy 8ef3779eed Fix incorrect freed autoload check
To check if an autoload was freed, it currently checks for `scene_file_path` by using `Node::is_instance()`, and not if it was actually freed or not. I fixed it by checking if the node is inside the tree, as a freed node cannot be inside the tree anyway.

This sometimes caused crashes when plugins handle their autoloads weirdly (e.g PhantomCamera), which this fixes.

(cherry picked from commit 6848ea595e91cf6a1d5dc4f88c964f8d1f6de178)
2026-07-25 13:19:50 -05:00
Natalie Martin 5ccc031eca Editor: Fix crash in project settings when autoload has been freed
The `EditorAutoloadSettings` class does not expect an autoload node to
be freed in between its initial instantiation and any calls to
`update_autoload()`. But this actually *can* happen if the autoload is
an editor script and happens to run something like `queue_free()`
shortly after being initialized.

When this happens, opening the project settings panel results in a
crash, since the editor is trying to locate data such as the node's
script after it has already been deleted.

To fix this, just verify that the node still exists prior to accessing
any of the node's data.

(cherry picked from commit 90d0be8fa34f69bd7cf3a40432a2504234fa5797)
2026-07-04 11:03:29 -05:00
StarryWorm 4ae336740d Add missing resource_*.h includes
Add missing `resource_importer.h` includes
Add missing `resource_loader.h` includes
Add missing `resource_saver.h` includes
2026-03-27 07:03:39 -04:00
kobewi 0d220b35a5 Add _get_tooltip_auto_translate_mode_at() to Control 2026-03-22 17:56:46 +01:00
Rémi Verschelde 005e054245 Remove unused includes in editor with clangd-tidy
Also includes the few changes flagged in `main`.
2026-03-15 20:47:05 +01:00
Rémi Verschelde 2dd1f4ef60 Decouple node.h from scene_tree.h, minimize its other includes 2026-03-05 13:54:46 +01:00
kobewi 52c2628484 Revamp autoload creation 2026-03-05 12:20:29 +01:00
Rémi Verschelde eabb9a63d4 Rename callable_method_pointer.h to callable_mp.h and include it explicitly
This allows removing it from `class_db.h`, significantly reducing the amount of files
that include it transitively.

Also includes some include cleanup in `control.h` and `rich_text_label.h` done while
ensure they don't depend on `callable_mp`.
2026-03-04 16:23:23 +01:00
Thaddeus Crews e380a41752 Style: Add class_db.h includes explicitly 2026-02-26 15:50:28 -06:00
passivestar 6f0bd2efb9 Improve spacing in trees showing table data in modern theme 2026-01-12 00:01:49 +04:00
Michael Alexsander da561cd619 More scroll hint work around the editor 2026-01-06 18:34:20 -03:00
kobewi f63186f707 Ensure scene paths in autoload settings 2025-12-24 22:59:58 +01:00
Aditya Raj d940614595 Autoloads with UIDs 2025-11-07 21:08:54 +05:30
Kamil Tokarski d3fadcb5fb Add name info to EditorAutoloadSettings invalid name message 2025-09-05 01:39:32 +02:00
Vojtěch Struhár f985abbf83 Align autoload columns to the left 2025-07-18 20:28:56 +02:00
Lindo 90327dcbec Fix new autoload scripts using file name instead of user defined name 2025-07-15 20:27:31 +02:00
A Thousand Ships f11aff3841 Editor: Restructure editor code
Moving various editor files into sub folders to reduce clutter
2025-07-04 18:18:22 +02:00