mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 03:29:33 +02:00
* added try..finally to beginupdate/endupdate, mantis #29165
git-svn-id: trunk@32629 -
This commit is contained in:
parent
1d015b9620
commit
aa33a9509f
@ -951,12 +951,15 @@ Var
|
|||||||
Str : String;
|
Str : String;
|
||||||
begin
|
begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
|
Try
|
||||||
Obj:=Objects[CurIndex];
|
Obj:=Objects[CurIndex];
|
||||||
Str:=Strings[CurIndex];
|
Str:=Strings[CurIndex];
|
||||||
Objects[CurIndex]:=Nil; // Prevent Delete from freeing.
|
Objects[CurIndex]:=Nil; // Prevent Delete from freeing.
|
||||||
Delete(Curindex);
|
Delete(Curindex);
|
||||||
InsertObject(NewIndex,Str,Obj);
|
InsertObject(NewIndex,Str,Obj);
|
||||||
|
finally
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user