* Fix AV in case there is no changelist (local dataset)

This commit is contained in:
michael 2018-02-10 20:49:48 +00:00
parent 8c3c8022c9
commit 53c1915185

View File

@ -3973,7 +3973,8 @@ begin
R:=AddToChangeList(usDeleted); R:=AddToChangeList(usDeleted);
If Not TryDoing(@InternalDelete,OnDeleteError) then If Not TryDoing(@InternalDelete,OnDeleteError) then
begin begin
RemoveFromChangeList(R); if Assigned(R) then
RemoveFromChangeList(R);
exit; exit;
end; end;
{$ifdef dsdebug} {$ifdef dsdebug}
@ -4533,7 +4534,8 @@ begin
Resync([]); Resync([]);
// We get the new values here, since the bookmark should now be correct to find the record later on when doing applyupdates. // We get the new values here, since the bookmark should now be correct to find the record later on when doing applyupdates.
R:=AddToChangeList(UpdateStates[wasInsert]); R:=AddToChangeList(UpdateStates[wasInsert]);
R.FBookmark:=BookMark; if Assigned(R) then
R.FBookmark:=BookMark;
{$ifdef dsdebug} {$ifdef dsdebug}
writeln ('Post: Browse mode set'); writeln ('Post: Browse mode set');
{$endif} {$endif}