1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-06 19:41:11 +00:00

Fix 'Attempted to remove invalid ID' errors

This commit is contained in:
Rafał Mikrut
2021-07-31 08:52:50 +02:00
parent f2efa6f4f3
commit e8877806ec
4 changed files with 18 additions and 18 deletions

View File

@@ -146,7 +146,9 @@ void ShaderRD::_clear_version(Version *p_version) {
//clear versions if they exist
if (p_version->variants) {
for (int i = 0; i < variant_defines.size(); i++) {
RD::get_singleton()->free(p_version->variants[i]);
if (variants_enabled[i]) {
RD::get_singleton()->free(p_version->variants[i]);
}
}
memdelete_arr(p_version->variants);