Skip to content

Commit

Permalink
Merge pull request #40180 from Coldragon/fix-crash-no-feature-profile
Browse files Browse the repository at this point in the history
Fix crash on editor without a feature profile
  • Loading branch information
akien-mga authored Jul 10, 2020
2 parents 0f6a8f5 + f2a01b0 commit f46dc6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit f46dc6f

Please sign in to comment.