🚨 Guard animation texture deletion against empty frame lists
Destroying an animation material with no frames dereferenced an empty array.
This commit is contained in:
@@ -1835,6 +1835,7 @@ end;
|
|||||||
|
|
||||||
destructor TAnimMaterial.Destroy;
|
destructor TAnimMaterial.Destroy;
|
||||||
begin
|
begin
|
||||||
|
if Length(FTextures) > 0 then
|
||||||
glDeleteTextures(Length(FTextures), @FTextures[0]);
|
glDeleteTextures(Length(FTextures), @FTextures[0]);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Reference in New Issue
Block a user