hedgewars/uMisc.pas
changeset 3513 f589230fa21b
parent 3464 cdb0ddeb38ba
child 3533 03892fb97ab3
--- a/hedgewars/uMisc.pas	Thu Jun 17 11:42:23 2010 -0400
+++ b/hedgewars/uMisc.pas	Thu Jun 17 19:57:51 2010 +0200
@@ -506,13 +506,16 @@
 
 procedure FreeTexture(tex: PTexture);
 begin
-if tex <> nil then
+    if tex <> nil then
     begin
-    if tex^.NextTexture <> nil then tex^.NextTexture^.PrevTexture:= tex^.PrevTexture;
-    if tex^.PrevTexture <> nil then tex^.PrevTexture^.NextTexture:= tex^.NextTexture
-    else TextureList:= tex^.NextTexture;
-    glDeleteTextures(1, @tex^.id);
-    Dispose(tex)
+        if tex^.NextTexture <> nil then 
+            tex^.NextTexture^.PrevTexture:= tex^.PrevTexture;
+        if tex^.PrevTexture <> nil then 
+            tex^.PrevTexture^.NextTexture:= tex^.NextTexture
+        else 
+            TextureList:= tex^.NextTexture;
+        glDeleteTextures(1, @tex^.id);
+        Dispose(tex);
     end
 end;