diff options
author | honix <ted888@ya.ru> | 2017-05-15 20:49:20 +0300 |
---|---|---|
committer | honix <ted888@ya.ru> | 2017-05-15 20:49:20 +0300 |
commit | 9d7d24682d5efd9cafb1e0fa52764bc44cf17b6b (patch) | |
tree | 3b4391a6f6837236accf86144854c71d78ea1b63 | |
parent | 4db79346bb7aa0a8361e0d551005ffa64e5bc91c (diff) |
Particles potential crash fix
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 1025acceb4..eed2afe71f 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -4859,6 +4859,7 @@ void RasterizerStorageGLES3::particles_set_amount(RID p_particles, int p_amount) Particles *particles = particles_owner.getornull(p_particles); ERR_FAIL_COND(!particles); + ERR_FAIL_COND(p_amount < 1); particles->amount = p_amount; @@ -4912,6 +4913,7 @@ void RasterizerStorageGLES3::particles_set_lifetime(RID p_particles, float p_lif Particles *particles = particles_owner.getornull(p_particles); ERR_FAIL_COND(!particles); + ERR_FAIL_COND(p_lifetime <= 0); particles->lifetime = p_lifetime; } void RasterizerStorageGLES3::particles_set_pre_process_time(RID p_particles, float p_time) { |