diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-06-14 12:29:41 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-06-14 12:32:19 +0800 |
commit | 37db8d61845f1bf22d50939268aa8baa2663d06b (patch) | |
tree | 2ea1b82bb6f927d4fd01a006a70f27b6f971a092 /core | |
parent | 12e0f10c74e9619262f1edcfdc1840432ada0565 (diff) |
Fix crash when freeing GradientTexture and NoiseTexture
Diffstat (limited to 'core')
-rw-r--r-- | core/templates/rid_owner.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/templates/rid_owner.h b/core/templates/rid_owner.h index c4aa93c394..31278b71bd 100644 --- a/core/templates/rid_owner.h +++ b/core/templates/rid_owner.h @@ -351,6 +351,9 @@ public: for (size_t i = 0; i < max_alloc; i++) { uint64_t validator = validator_chunks[i / elements_in_chunk][i % elements_in_chunk]; + if (validator & 0x80000000) { + continue; //uninitialized + } if (validator != 0xFFFFFFFF) { chunks[i / elements_in_chunk][i % elements_in_chunk].~T(); } |