mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-09 16:24:19 +00:00
Add missing initializations for Node3DEditor.
Do not try to format fields with garbage values in _snap_update() Initialize grid_enable[] before use. Initialize previewing_camera before use. These are all cases found live, with valgrind. Fixes #76925 (cherry picked from commit 4bc513edbcd49d1067e0cd70326f50f149660b89)
This commit is contained in:
@@ -8340,8 +8340,6 @@ Node3DEditor::Node3DEditor() {
|
||||
snap_scale->set_select_all_on_focus(true);
|
||||
snap_dialog_vbc->add_margin_child(TTR("Scale Snap (%):"), snap_scale);
|
||||
|
||||
_snap_update();
|
||||
|
||||
/* SETTINGS DIALOG */
|
||||
|
||||
settings_dialog = memnew(ConfirmationDialog);
|
||||
@@ -8659,7 +8657,7 @@ void fragment() {
|
||||
_load_default_preview_settings();
|
||||
_preview_settings_changed();
|
||||
}
|
||||
clear(); // Make sure values are initialized.
|
||||
clear(); // Make sure values are initialized. Will call _snap_update() for us.
|
||||
}
|
||||
Node3DEditor::~Node3DEditor() {
|
||||
memdelete(preview_node);
|
||||
|
||||
Reference in New Issue
Block a user