mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-05 23:07:42 -05:00
Merge pull request #109644 from RandomShaper/fix_dupe_tex2darr
Fix material removal clearing all instances of shared texture arrays
This commit is contained in:
@@ -2398,7 +2398,8 @@ void MaterialStorage::material_free(RID p_rid) {
|
||||
// This happens when the app is being closed.
|
||||
for (KeyValue<StringName, Variant> &E : material->params) {
|
||||
if (E.value.get_type() == Variant::ARRAY) {
|
||||
Array(E.value).clear();
|
||||
// Clear the array for this material only (the array may be shared).
|
||||
E.value = Variant();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user