diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-07-10 11:00:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-10 11:00:51 +0200 |
commit | f46dc6fb68d23c055fd1ffb04bee0c02c41c7b4d (patch) | |
tree | d516c3cd4a7c292de8ac9e739d627f33456c6c32 /editor | |
parent | 0f6a8f57eecd580f1752bb65f9f6f4aad2c40580 (diff) | |
parent | f2a01b0c6b05f0764288bc17dd2e91225c53ca75 (diff) |
Merge pull request #40180 from Coldragon/fix-crash-no-feature-profile
Fix crash on editor without a feature profile
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 454170647f..fe68797483 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1241,7 +1241,7 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) { // The 3D editor may be disabled as a feature, but scenes can still be opened. // This check prevents the preview from regenerating in case those scenes are then saved. Ref<EditorFeatureProfile> profile = feature_profile_manager->get_current_profile(); - if (!profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D)) { + if (profile.is_valid() && !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D)) { img = Node3DEditor::get_singleton()->get_editor_viewport(0)->get_viewport_node()->get_texture()->get_data(); } } |