Skip to content

I fixed a bug in TIPTCTag.Destroy #13

@GabrielOnDelphi

Description

@GabrielOnDelphi

see comment:

destructor TIPTCTag.Destroy;
begin
if (FSection <> NIL) AND (FSection.FTags <> NIL) { I had a crash because the second check was missing. Reaseon: FTags are already freed by TIPTCSection.Destroy }
then FSection.FTags.Extract(Self);
ReallocMem(FData, 0);
inherited;
end;

how I discovered the bug? with some help from FreeAndNil.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions