lazreport: don't crash on preview if dataset is not set

git-svn-id: trunk@23044 -
This commit is contained in:
paul 2009-12-09 07:08:32 +00:00
parent 101acea082
commit 3ae1da9a91

View File

@ -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;