Changeset 278 for trunk/Forms


Ignore:
Timestamp:
Feb 14, 2019, 10:25:13 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Incorrect way to assign units between two game systems causing crash of the application on exit.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormGameSystem.pas

    r277 r278  
    9898procedure TFormGameSystem.FormDestroy(Sender: TObject);
    9999begin
    100   FormUnitKinds.Free;
     100  GameSystem := nil;
     101  FreeAndNil(FormUnitKinds);
    101102end;
    102103
  • trunk/Forms/UFormGameSystems.lfm

    r275 r278  
    1010  OnClose = FormClose
    1111  OnCreate = FormCreate
     12  OnDestroy = FormDestroy
    1213  OnShow = FormShow
    1314  LCLVersion = '1.8.4.0'
  • trunk/Forms/UFormGameSystems.pas

    r277 r278  
    3838    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    3939    procedure FormCreate(Sender: TObject);
     40    procedure FormDestroy(Sender: TObject);
    4041    procedure FormShow(Sender: TObject);
    4142    procedure ListView1Data(Sender: TObject; Item: TListItem);
     
    159160end;
    160161
     162procedure TFormGameSystems.FormDestroy(Sender: TObject);
     163begin
     164  GameSystems := nil;
     165end;
     166
    161167procedure TFormGameSystems.FormShow(Sender: TObject);
    162168begin
Note: See TracChangeset for help on using the changeset viewer.