Merge pull request #36476 from qarmin/vector_set_err

Change CRASH_COND to ERR_FAIL in Cowdata::set
This commit is contained in:
Rémi Verschelde 2021-02-24 22:48:33 +01:00 committed by GitHub
commit 273fe7e656
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,7 +142,7 @@ public:
_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;
}