diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-11-12 20:31:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-12 20:31:51 +0100 |
commit | 31117588fd8558fa14c8625fe018ffcb16e4c27f (patch) | |
tree | 8e8186b3416cd94c37d702fb03195862abf38731 /editor | |
parent | 48d57e4a30e01d0f8eec54d469bc9e69a77240b2 (diff) | |
parent | 5c88ad9457a180fefc07707ed29f392e2cb98dce (diff) |
Merge pull request #12823 from Web-eWorks/meshdropfix
Fix #12571: Dragging OBJ mesh files no longer instances a scene
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index e8714cece6..cc144344a6 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -2917,7 +2917,9 @@ bool SpatialEditorViewport::_create_instance(Node *parent, String &path, const P } } - instanced_scene->set_filename(ProjectSettings::get_singleton()->localize_path(path)); + if (scene != NULL) { + instanced_scene->set_filename(ProjectSettings::get_singleton()->localize_path(path)); + } editor_data->get_undo_redo().add_do_method(parent, "add_child", instanced_scene); editor_data->get_undo_redo().add_do_method(instanced_scene, "set_owner", editor->get_edited_scene()); |