Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix `EditorContextMenuPluginManager` crash in Project Manager.

Pāvels Nadtočajevsa2150f1efd8b
diff --git a/editor/inspector/editor_inspector.cpp b/editor/inspector/editor_inspector.cpp
index 6f0e3f74bd4..b2acdfcd489 100644
--- a/editor/inspector/editor_inspector.cpp
+++ b/editor/inspector/editor_inspector.cpp
@@ -1744,8 +1744,10 @@ void EditorProperty::_update_popup() {
menu->add_icon_item(theme_cache.help_icon, TTR("Open Documentation"), MENU_OPEN_DOCUMENTATION);
}
- Vector<String> property_paths = { String::num_int64(get_edited_object()->get_instance_id()), property_path };
- EditorContextMenuPluginManager::get_singleton()->add_options_from_plugins(menu, EditorContextMenuPlugin::CONTEXT_SLOT_INSPECTOR_PROPERTY, property_paths);
+ if (EditorContextMenuPluginManager::get_singleton()) {
+ Vector<String> property_paths = { String::num_int64(get_edited_object()->get_instance_id()), property_path };
+ EditorContextMenuPluginManager::get_singleton()->add_options_from_plugins(menu, EditorContextMenuPlugin::CONTEXT_SLOT_INSPECTOR_PROPERTY, property_paths);
+ }
}
////////////////////////////////////////////////