hedgewars/uChat.pas
branchqmlfrontend
changeset 10748 dc587913987c
parent 10634 35d059bd0932
child 10737 408803ca951a
--- a/hedgewars/uChat.pas	Thu Dec 18 00:03:53 2014 +0300
+++ b/hedgewars/uChat.pas	Sat Jan 03 23:46:26 2015 +0300
@@ -147,7 +147,7 @@
 var color  : TSDL_Color;
 begin
 if cl.Tex <> nil then
-    FreeTexture(cl.Tex);
+    FreeAndNilTexture(cl.Tex);
 
 if isInput then
     begin
@@ -583,9 +583,9 @@
 procedure freeModule;
 var i: ShortInt;
 begin
-    FreeTexture(InputStr.Tex);
+    FreeAndNilTexture(InputStr.Tex);
     for i:= 0 to MaxStrIndex do
-        FreeTexture(Strs[i].Tex);
+        FreeAndNilTexture(Strs[i].Tex);
 end;
 
 end.