You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-01 16:38:31 +00:00
Preventing an editor crash in the event that a plugin scene's root-node is null.
(cherry picked from commit 2adfdbe184)
This commit is contained in:
committed by
Hein-Pieter van Braam
parent
d3a482ab65
commit
00fa61f8f5
@@ -302,7 +302,7 @@ void EditorPlugin::remove_custom_type(const String &p_type) {
|
||||
}
|
||||
|
||||
ToolButton *EditorPlugin::add_control_to_bottom_panel(Control *p_control, const String &p_title) {
|
||||
|
||||
ERR_FAIL_NULL_V(p_control, NULL);
|
||||
return EditorNode::get_singleton()->add_bottom_panel_item(p_title, p_control);
|
||||
}
|
||||
|
||||
@@ -325,6 +325,7 @@ void EditorPlugin::remove_control_from_bottom_panel(Control *p_control) {
|
||||
}
|
||||
|
||||
void EditorPlugin::add_control_to_container(CustomControlContainer p_location, Control *p_control) {
|
||||
ERR_FAIL_NULL(p_control);
|
||||
|
||||
switch (p_location) {
|
||||
|
||||
@@ -374,6 +375,7 @@ void EditorPlugin::add_control_to_container(CustomControlContainer p_location, C
|
||||
}
|
||||
|
||||
void EditorPlugin::remove_control_from_container(CustomControlContainer p_location, Control *p_control) {
|
||||
ERR_FAIL_NULL(p_control);
|
||||
|
||||
switch (p_location) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user