|
@@ -1117,7 +1117,7 @@ var
|
|
begin
|
|
begin
|
|
CheckInactive;
|
|
CheckInactive;
|
|
For I:=0 to Length(FIndexes)-1 do
|
|
For I:=0 to Length(FIndexes)-1 do
|
|
- FreeAndNil(Findexes[I]);
|
|
|
|
|
|
+ FreeAndNil(FIndexes[I]);
|
|
SetLength(FIndexes,0);
|
|
SetLength(FIndexes,0);
|
|
FIndexesCount:=0;
|
|
FIndexesCount:=0;
|
|
end;
|
|
end;
|
|
@@ -1339,7 +1339,10 @@ end;
|
|
|
|
|
|
function TBufIndex.CompareBookmarks(const ABookmark1, ABookmark2: PBufBookmark): boolean;
|
|
function TBufIndex.CompareBookmarks(const ABookmark1, ABookmark2: PBufBookmark): boolean;
|
|
begin
|
|
begin
|
|
- Result := (ABookmark1^.BookmarkData=ABookmark2^.BookmarkData);
|
|
|
|
|
|
+ if assigned(ABookmark1) and assigned(ABookmark2) then
|
|
|
|
+ Result := (ABookmark1^.BookmarkData=ABookmark2^.BookmarkData)
|
|
|
|
+ else
|
|
|
|
+ Result := False;
|
|
end;
|
|
end;
|
|
|
|
|
|
function TBufIndex.GetRecord(ABookmark: PBufBookmark; GetMode: TGetMode): TGetResult;
|
|
function TBufIndex.GetRecord(ABookmark: PBufBookmark; GetMode: TGetMode): TGetResult;
|
|
@@ -3008,7 +3011,9 @@ end;
|
|
function TCustomBufDataset.CompareBookmarks(Bookmark1, Bookmark2: TBookmark
|
|
function TCustomBufDataset.CompareBookmarks(Bookmark1, Bookmark2: TBookmark
|
|
): Longint;
|
|
): Longint;
|
|
begin
|
|
begin
|
|
- if Assigned(FCurrentIndex) and FCurrentIndex.CompareBookmarks(pointer(Bookmark1),pointer(Bookmark2)) then
|
|
|
|
|
|
+ if not assigned(Bookmark1) or not assigned(Bookmark2) then
|
|
|
|
+ Result := 0
|
|
|
|
+ else if Assigned(FCurrentIndex) and FCurrentIndex.CompareBookmarks(pointer(Bookmark1),pointer(Bookmark2)) then
|
|
Result := 0
|
|
Result := 0
|
|
else
|
|
else
|
|
Result := -1;
|
|
Result := -1;
|