You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Fix PropertyListHelper::_get_property returning a valid value even if an index is outside the array valid indices
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
This commit is contained in:
@@ -1964,6 +1964,7 @@ void EditorFileDialog::_bind_methods() {
|
||||
Option defaults;
|
||||
|
||||
base_property_helper.set_prefix("option_");
|
||||
base_property_helper.set_array_length_getter(&EditorFileDialog::get_option_count);
|
||||
base_property_helper.register_property(PropertyInfo(Variant::STRING, "name"), defaults.name, &EditorFileDialog::set_option_name, &EditorFileDialog::get_option_name);
|
||||
base_property_helper.register_property(PropertyInfo(Variant::PACKED_STRING_ARRAY, "values"), defaults.values, &EditorFileDialog::set_option_values, &EditorFileDialog::get_option_values);
|
||||
base_property_helper.register_property(PropertyInfo(Variant::INT, "default"), defaults.default_idx, &EditorFileDialog::set_option_default, &EditorFileDialog::get_option_default);
|
||||
|
||||
Reference in New Issue
Block a user