summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ad420f)
raw | patch | inline | side by side (parent: 1ad420f)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 6 Feb 2019 00:27:24 +0000 (03:27 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 6 Feb 2019 00:27:24 +0000 (03:27 +0300) |
src/game/g_textures.pas | patch | blob | history |
index 9f551f5b830ce6a3aa19d1746256bec631750950..78cfee512125cacdde9d939961dddeca0b4184ff 100644 (file)
--- a/src/game/g_textures.pas
+++ b/src/game/g_textures.pas
if WAD.GetResource(g_ExtractFilePathName(Resource), TextureData, ResourceLength) then
begin
if e_CreateTextureMem(TextureData, ResourceLength, ID) then
- begin
result := true;
- end
- else
- begin
- FreeMem(TextureData);
- end;
+ FreeMem(TextureData)
end
else
begin
e_GetTextureSize(texturesArray[find_id].ID, @texturesArray[find_id].width, @texturesArray[find_id].height);
texturesArray[find_id].used := true;
texturesArray[find_id].Name := textureName;
- end
- else
- begin
- FreeMem(TextureData);
end;
+ FreeMem(TextureData)
end
else
begin
if not CreateFramesMem(TextureData, ResourceLength, ID, Name, mWidth, mHeight, mCount, BackAnimation) then
begin
+ FreeMem(TextureData);
WAD.Free();
exit;
end;
+ FreeMem(TextureData);
WAD.Free();
result := true;