Merge pull request #15170 from ibrahn/fix-particle-leak

RasterizerStorageGLES3, delete particle objects freed by RID
This commit is contained in:
Rémi Verschelde 2018-01-04 01:07:54 +01:00 committed by GitHub
commit 72d3c474b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6943,6 +6943,10 @@ bool RasterizerStorageGLES3::free(RID p_rid) {
glDeleteTextures(1, &cls->distance);
canvas_light_shadow_owner.free(p_rid);
memdelete(cls);
} else if (particles_owner.owns(p_rid)) {
Particles *particles = particles_owner.get(p_rid);
particles_owner.free(p_rid);
memdelete(particles);
} else {
return false;
}