Skip to content

Commit

Permalink
Merge pull request #36476 from qarmin/vector_set_err
Browse files Browse the repository at this point in the history
Change CRASH_COND to ERR_FAIL in Cowdata::set
  • Loading branch information
akien-mga authored Feb 24, 2021
2 parents 305683f + bb6ece1 commit 273fe7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/templates/cowdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class CowData {
_FORCE_INLINE_ bool is_empty() const { return _ptr == nullptr; }

_FORCE_INLINE_ void set(int p_index, const T &p_elem) {
CRASH_BAD_INDEX(p_index, size());
ERR_FAIL_INDEX(p_index, size());
_copy_on_write();
_get_data()[p_index] = p_elem;
}
Expand Down

0 comments on commit 273fe7e

Please sign in to comment.