diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-10-12 10:55:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 10:55:53 +0200 |
commit | d18eba4d18d8dbe761d91efa2d7f4bea42b2104a (patch) | |
tree | 29a60a3f486f7d4e625aaf1b6cf166fcd679e31a /editor | |
parent | b3b5cd021c46db7c29cac65fb1a5eb4caaf7c962 (diff) | |
parent | f98acd5cfb455d7402cd7e263251a8df41746782 (diff) |
Merge pull request #42733 from madmiraal/fix-41281
Ensure grid index is valid before trying to change value.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_properties.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 4c8af615b4..9e68ef2f35 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -614,7 +614,7 @@ public: const Ref<InputEventMouseButton> mb = p_ev; - if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) { + if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed() && hovered_index > 0) { // Toggle the flag. // We base our choice on the hovered flag, so that it always matches the hovered flag. if (value & (1 << hovered_index)) { |