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 /scene/resources | |
parent | 12e0f10c74e9619262f1edcfdc1840432ada0565 (diff) |
Fix crash when freeing GradientTexture and NoiseTexture
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/texture.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 064563d4b5..938cd9b54f 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -1595,6 +1595,7 @@ void GradientTexture::_update() { } void GradientTexture::set_width(int p_width) { + ERR_FAIL_COND(p_width <= 0); width = p_width; _queue_update(); } |