From 9903de9c24a9ef7602bfd828dc58e01d20c1fe84 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 15 Nov 2026 09:14:02 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20Guard=20animation=20texture=20de?= =?UTF-8?q?letion=20against=20empty=20frame=20lists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Destroying an animation material with no frames dereferenced an empty array. --- Client/ULandscape.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Client/ULandscape.pas b/Client/ULandscape.pas index aa1cd5f..86c34b8 100644 --- a/Client/ULandscape.pas +++ b/Client/ULandscape.pas @@ -1835,7 +1835,8 @@ end; destructor TAnimMaterial.Destroy; begin - glDeleteTextures(Length(FTextures), @FTextures[0]); + if Length(FTextures) > 0 then + glDeleteTextures(Length(FTextures), @FTextures[0]); inherited Destroy; end;