summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b4e1588)
raw | patch | inline | side by side (parent: b4e1588)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Thu, 16 Feb 2023 19:13:06 +0000 (22:13 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 09:15:00 +0000 (12:15 +0300) |
src/game/renders/opengl/r_textures.pas | patch | blob | history |
index ec47f58bc640ecd4d2a213246f19519ccaaef100..97d572c5776b02fac7f16af63070b832cc4933c0 100644 (file)
begin
for i := 0 to High(atl) do
begin
- glDeleteTextures(1, @atl[i].id);
- atl[i].id := 0;
- r_Common_FreeAndNil(atl[i]);
+ if atl[i] <> nil then
+ begin
+ glDeleteTextures(1, @atl[i].id);
+ atl[i].id := 0;
+ r_Common_FreeAndNil(atl[i]);
+ end;
end;
end;
SetLength(atl, 0);
begin
for i := 0 to High(ratl) do
begin
- glDeleteTextures(1, @ratl[i].id);
- ratl[i].id := 0;
- r_Common_FreeAndNil(ratl[i]);
+ if ratl[i] <> nil then
+ begin
+ glDeleteTextures(1, @ratl[i].id);
+ ratl[i].id := 0;
+ r_Common_FreeAndNil(ratl[i]);
+ end;
end;
end;
SetLength(ratl, 0);