hedgewars/uChat.pas
branchqmlfrontend
changeset 10748 dc587913987c
parent 10634 35d059bd0932
child 10737 408803ca951a
equal deleted inserted replaced
10616:20a2d5e6930a 10748:dc587913987c
   145 
   145 
   146 procedure SetLine(var cl: TChatLine; str: shortstring; isInput: boolean);
   146 procedure SetLine(var cl: TChatLine; str: shortstring; isInput: boolean);
   147 var color  : TSDL_Color;
   147 var color  : TSDL_Color;
   148 begin
   148 begin
   149 if cl.Tex <> nil then
   149 if cl.Tex <> nil then
   150     FreeTexture(cl.Tex);
   150     FreeAndNilTexture(cl.Tex);
   151 
   151 
   152 if isInput then
   152 if isInput then
   153     begin
   153     begin
   154     cl.s:= str;
   154     cl.s:= str;
   155     color:= colors[#6];
   155     color:= colors[#6];
   581 end;
   581 end;
   582 
   582 
   583 procedure freeModule;
   583 procedure freeModule;
   584 var i: ShortInt;
   584 var i: ShortInt;
   585 begin
   585 begin
   586     FreeTexture(InputStr.Tex);
   586     FreeAndNilTexture(InputStr.Tex);
   587     for i:= 0 to MaxStrIndex do
   587     for i:= 0 to MaxStrIndex do
   588         FreeTexture(Strs[i].Tex);
   588         FreeAndNilTexture(Strs[i].Tex);
   589 end;
   589 end;
   590 
   590 
   591 end.
   591 end.