From f2a01b0c6b05f0764288bc17dd2e91225c53ca75 Mon Sep 17 00:00:00 2001 From: coldragon Date: Tue, 7 Jul 2020 17:00:14 +0200 Subject: [PATCH] Fix crash on editor without a feature profile --- editor/editor_node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 454170647ff6..fe68797483d1 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 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(); } }