Skip to content

Commit

Permalink
Fixed potential AV exception
Browse files Browse the repository at this point in the history
  • Loading branch information
davidberneda committed Nov 9, 2023
1 parent 56e6ffe commit 28a352a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
9 changes: 0 additions & 9 deletions demos/FireMonkey/TeeGridFeatures/Views/Unit_FMX_REST.fmx
Original file line number Diff line number Diff line change
Expand Up @@ -62,47 +62,38 @@ object RESTClientTeeGridForm: TRESTClientTeeGridForm
object TeeGrid1: TTeeGrid
Columns = <
item
LoadOrder = 0
Header.Text = 'id'
Link = 'id'
end
item
LoadOrder = 1
Header.Text = 'name'
Link = 'name'
end
item
LoadOrder = 2
Header.Text = 'username'
Link = 'username'
end
item
LoadOrder = 3
Header.Text = 'email'
Link = 'email'
end
item
LoadOrder = 4
Header.Text = 'address'
Link = 'address'
end
item
LoadOrder = 5
Header.Text = 'phone'
Link = 'phone'
end
item
LoadOrder = 6
Header.Text = 'website'
Link = 'website'
end
item
LoadOrder = 7
Header.Text = 'company'
Link = 'company'
end>
DataSource = FDMemTable1
CellFormat = <>
Align = Client
Size.Width = 872.000000000000000000
Size.Height = 596.000000000000000000
Expand Down
3 changes: 2 additions & 1 deletion demos/FireMonkey/TeeGridFeatures/Views/Unit_FMX_REST.pas
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ procedure TRESTClientTeeGridForm.GetAlbums(const Sender: TExpanderRender; const
AData:=TVirtualDBData.From(FDMemTable2.Fields[0]);

// Data should be destroyed automatically
TVirtualDBData(AData).OwnsData:=True;
if AData<>nil then
TVirtualDBData(AData).OwnsData:=True;
end;

procedure TRESTClientTeeGridForm.CBEnabledChange(Sender: TObject);
Expand Down

0 comments on commit 28a352a

Please sign in to comment.