mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 00:20:03 +02:00
IDE: Code-Templates, fix mem leak / Correct extend of try-except block (do not hide errors, that are not expected/handled)
git-svn-id: trunk@62285 -
This commit is contained in:
parent
c93e1c6d7e
commit
67d6109619
@ -5255,6 +5255,11 @@ begin
|
||||
try
|
||||
LoadStringsFromFileUTF8(AnAutoComplete.AutoCompleteList, s);
|
||||
Result := mrOK;
|
||||
except
|
||||
Result := mrAbort;
|
||||
end;
|
||||
if Result = mrAbort then
|
||||
exit;
|
||||
|
||||
FileVersion := AnAutoComplete.Completions.Count;
|
||||
if (FileVersion > 0) then begin
|
||||
@ -5271,7 +5276,7 @@ begin
|
||||
j := NewAutoComplete.CompletionAttributes[i].IndexOfName(DciVersionName);
|
||||
if j < 0 then
|
||||
continue;
|
||||
v := StrToIntDef(AnAutoComplete.CompletionAttributes[i][j], 0);
|
||||
v := StrToIntDef(NewAutoComplete.CompletionAttributes[i][j], 0);
|
||||
if v <= FileVersion then
|
||||
continue;
|
||||
if AnAutoComplete.Completions.IndexOf(NewAutoComplete.Completions[i]) >= 0 then
|
||||
@ -5290,9 +5295,6 @@ begin
|
||||
if BuildBorlandDCIFile(AnAutoComplete) then
|
||||
SaveCodeTemplates(AnAutoComplete);
|
||||
end;
|
||||
except
|
||||
Result := mrAbort;
|
||||
end;
|
||||
end
|
||||
else begin
|
||||
AnAutoComplete.AutoCompleteList.Text := ResourceDCIAsText;
|
||||
|
Loading…
Reference in New Issue
Block a user