mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-08 11:47:16 +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
@ -6132,11 +6132,14 @@ var
|
|||||||
procedure BackupBookmark(b: TfrBand);
|
procedure BackupBookmark(b: TfrBand);
|
||||||
var
|
var
|
||||||
n: Integer;
|
n: Integer;
|
||||||
|
begin
|
||||||
|
if b.Dataset <> nil then
|
||||||
begin
|
begin
|
||||||
n := Length(BooksBkUp);
|
n := Length(BooksBkUp);
|
||||||
SetLength(BooksBkUp, n+1);
|
SetLength(BooksBkUp, n+1);
|
||||||
BooksBkUp[n].Dataset := b.Dataset;
|
BooksBkUp[n].Dataset := b.Dataset;
|
||||||
BooksBkUp[n].Bookmark := b.Dataset.GetBookmark;
|
BooksBkUp[n].Bookmark := b.Dataset.GetBookmark;
|
||||||
|
end;
|
||||||
if b.Typ in [btDetailData,btSubDetailData] then
|
if b.Typ in [btDetailData,btSubDetailData] then
|
||||||
inc(DetailCount);
|
inc(DetailCount);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user