1
0
Fork 0

Merge pull request #64235 from tinmanjuggernaut/gles2_free_abuse

Fix free(RID) abuse by various classes
This commit is contained in:
lawnjelly 2022-08-15 19:05:58 +01:00 committed by GitHub
commit 196201d6f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View File

@ -419,5 +419,7 @@ Particles2D::Particles2D() {
}
Particles2D::~Particles2D() {
VS::get_singleton()->free(particles);
if (particles.is_valid()) {
VS::get_singleton()->free(particles);
}
}

View File

@ -179,7 +179,9 @@ GIProbeData::GIProbeData() {
}
GIProbeData::~GIProbeData() {
VS::get_singleton()->free(probe);
if (probe.is_valid()) {
VS::get_singleton()->free(probe);
}
}
//////////////////////
@ -527,5 +529,7 @@ GIProbe::GIProbe() {
}
GIProbe::~GIProbe() {
VS::get_singleton()->free(gi_probe);
if (gi_probe.is_valid()) {
VS::get_singleton()->free(gi_probe);
}
}

View File

@ -416,5 +416,7 @@ Particles::Particles() {
}
Particles::~Particles() {
VS::get_singleton()->free(particles);
if (particles.is_valid()) {
VS::get_singleton()->free(particles);
}
}