diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2018-07-03 18:57:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-03 18:57:27 +0200 |
commit | 8cbe2105f50a61e0bc688a8de2125a2124feb01a (patch) | |
tree | 5c08201f882fbe02f1e23523178aab58e471ab92 | |
parent | 28ebddd49e0306f4a2d97572ff2ebf60e4acb6d4 (diff) | |
parent | 2adfdbe18410a048b93f27fdcdbe17f7ac0d1015 (diff) |
Merge pull request #19816 from leecommamichael/survive-null-scene-root-from-plugin
Survive editor crash if a plugin scene's root is null.
-rw-r--r-- | editor/editor_plugin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index cc44938c25..1582b54c8d 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -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) { - + ERR_FAIL_NULL_V(p_control, NULL); 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) { + ERR_FAIL_NULL(p_control); 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) { + ERR_FAIL_NULL(p_control); switch (p_location) { |