mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 18:09:32 +02:00
lazreport: don't crash on preview if dataset is not set
git-svn-id: trunk@23044 -
This commit is contained in:
parent
101acea082
commit
3ae1da9a91
@ -6133,10 +6133,13 @@ var
|
||||
var
|
||||
n: Integer;
|
||||
begin
|
||||
n := Length(BooksBkUp);
|
||||
SetLength(BooksBkUp, n+1);
|
||||
BooksBkUp[n].Dataset := b.Dataset;
|
||||
BooksBkUp[n].Bookmark := b.Dataset.GetBookmark;
|
||||
if b.Dataset <> nil then
|
||||
begin
|
||||
n := Length(BooksBkUp);
|
||||
SetLength(BooksBkUp, n+1);
|
||||
BooksBkUp[n].Dataset := b.Dataset;
|
||||
BooksBkUp[n].Bookmark := b.Dataset.GetBookmark;
|
||||
end;
|
||||
if b.Typ in [btDetailData,btSubDetailData] then
|
||||
inc(DetailCount);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user