mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Merge pull request #64235 from tinmanjuggernaut/gles2_free_abuse
Fix free(RID) abuse by various classes
This commit is contained in:
@@ -419,5 +419,7 @@ Particles2D::Particles2D() {
|
||||
}
|
||||
|
||||
Particles2D::~Particles2D() {
|
||||
VS::get_singleton()->free(particles);
|
||||
if (particles.is_valid()) {
|
||||
VS::get_singleton()->free(particles);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,5 +416,7 @@ Particles::Particles() {
|
||||
}
|
||||
|
||||
Particles::~Particles() {
|
||||
VS::get_singleton()->free(particles);
|
||||
if (particles.is_valid()) {
|
||||
VS::get_singleton()->free(particles);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user