From 53c19151859eec40d8fa9b94c787c35adec7ba5f Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 10 Feb 2018 20:49:48 +0000 Subject: [PATCH] * Fix AV in case there is no changelist (local dataset) --- packages/fcl-db/db.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/fcl-db/db.pas b/packages/fcl-db/db.pas index 7cbe452..a7b7e41 100644 --- a/packages/fcl-db/db.pas +++ b/packages/fcl-db/db.pas @@ -3973,7 +3973,8 @@ begin R:=AddToChangeList(usDeleted); If Not TryDoing(@InternalDelete,OnDeleteError) then begin - RemoveFromChangeList(R); + if Assigned(R) then + RemoveFromChangeList(R); exit; end; {$ifdef dsdebug} @@ -4533,7 +4534,8 @@ begin Resync([]); // 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.FBookmark:=BookMark; + if Assigned(R) then + R.FBookmark:=BookMark; {$ifdef dsdebug} writeln ('Post: Browse mode set'); {$endif}