Preventing an editor crash in the event that a plugin scene's root-node is null.
This commit is contained in:
parent
eeab3502d5
commit
2adfdbe184
|
@ -310,7 +310,7 @@ void EditorPlugin::remove_autoload_singleton(const String &p_name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton *EditorPlugin::add_control_to_bottom_panel(Control *p_control, const String &p_title) {
|
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);
|
return EditorNode::get_singleton()->add_bottom_panel_item(p_title, p_control);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,6 +333,7 @@ void EditorPlugin::remove_control_from_bottom_panel(Control *p_control) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorPlugin::add_control_to_container(CustomControlContainer p_location, Control *p_control) {
|
void EditorPlugin::add_control_to_container(CustomControlContainer p_location, Control *p_control) {
|
||||||
|
ERR_FAIL_NULL(p_control);
|
||||||
|
|
||||||
switch (p_location) {
|
switch (p_location) {
|
||||||
|
|
||||||
|
@ -382,6 +383,7 @@ void EditorPlugin::add_control_to_container(CustomControlContainer p_location, C
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorPlugin::remove_control_from_container(CustomControlContainer p_location, Control *p_control) {
|
void EditorPlugin::remove_control_from_container(CustomControlContainer p_location, Control *p_control) {
|
||||||
|
ERR_FAIL_NULL(p_control);
|
||||||
|
|
||||||
switch (p_location) {
|
switch (p_location) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue