🚨 Guard animation texture deletion against empty frame lists

Destroying an animation material with no frames dereferenced an
empty array.
This commit is contained in:
2026-11-15 22:06:51 +01:00
parent 6d0ae63be6
commit 9903de9c24
+2 -1
View File
@@ -1835,7 +1835,8 @@ end;
destructor TAnimMaterial.Destroy; destructor TAnimMaterial.Destroy;
begin begin
glDeleteTextures(Length(FTextures), @FTextures[0]); if Length(FTextures) > 0 then
glDeleteTextures(Length(FTextures), @FTextures[0]);
inherited Destroy; inherited Destroy;
end; end;