Ignore:
Timestamp:
Jan 6, 2025, 10:21:08 PM (2 days ago)
Author:
chronos
Message:
  • Fixed: Crash on cyclic map new move creation.
  • Modified: TView class moved into separate unit.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormClient.pas

    r375 r404  
    77  Game, LCLType, Menus, ActnList, ComCtrls, dateutils, XMLConf, DOM, Math,
    88  Geometry, GameClient, GameProtocol, Threading, Player, ClientGUI, FormEx,
    9   Generics.Collections;
     9  Generics.Collections, View;
    1010
    1111const
     
    7575    FClient: TClientGUI;
    7676    TempBitmap: TBitmap;
     77    TempView: TView;
    7778    StartMousePoint: TPoint;
    7879    StartViewPoint: TPoint;
     
    186187  CountP: TPoint;
    187188  X, Y: Integer;
    188   TempView: TView;
    189189begin
    190190  DrawStart := Now;
     
    205205
    206206      if Game.CyclicMap then begin
    207         TempView := TView.Create;
    208207        TempView.Game := Game;
    209208        //R := View.CellToCanvasRect(TRect.Create(Game.Map.Cells.First.PosPx,
     
    278277          end;
    279278        end;
    280         TempView.Free;
    281279        for Y := 0 to CountP.Y do begin
    282280          for X := 0 to CountP.X do begin
     
    432430  //DoubleBuffered := True;
    433431  TempBitmap := TBitmap.Create;
     432  TempView := TView.Create;
    434433  TimerPeriod := 0;
    435434  LastTimerTime := Now;
     
    518517begin
    519518  Client := nil;
    520   TempBitmap.Free;
     519  FreeAndNil(TempBitmap);
     520  FreeAndNil(TempView);
    521521end;
    522522
Note: See TracChangeset for help on using the changeset viewer.