Hide "Open documentation" context menu button in project manager

The EditorNode or internals of the ScriptEditor are not fully loaded in the project manager leading to crashes when the context menu tries to open an editor build-in documentation page.
This commit is contained in:
smix8 2025-12-02 22:45:58 +01:00
parent 25203e24c4
commit 3a090ff25e

View file

@ -1605,7 +1605,7 @@ void EditorProperty::_update_popup() {
menu->add_icon_item(theme_cache.revert_icon, TTR("Revert Value"), MENU_REVERT_VALUE); menu->add_icon_item(theme_cache.revert_icon, TTR("Revert Value"), MENU_REVERT_VALUE);
} }
} }
if (!doc_path.is_empty()) { if (!doc_path.is_empty() && ScriptEditor::get_singleton() && EditorNode::get_singleton()) {
menu->add_separator(); menu->add_separator();
menu->add_icon_item(theme_cache.help_icon, TTR("Open Documentation"), MENU_OPEN_DOCUMENTATION); menu->add_icon_item(theme_cache.help_icon, TTR("Open Documentation"), MENU_OPEN_DOCUMENTATION);
} }