mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 23:19:28 +02:00
lcl: repair TCustomPropertyStorage StorageNeeded balance with FreeStorage (fixes bug #0013239)
git-svn-id: trunk@19196 -
This commit is contained in:
parent
da507228d2
commit
e9adbdad62
@ -681,13 +681,21 @@ end;
|
||||
function TCustomPropertyStorage.ReadString(const Ident, DefaultValue: string): string;
|
||||
begin
|
||||
StorageNeeded(True);
|
||||
Result := DoReadString(RootSection, Ident, DefaultValue);
|
||||
try
|
||||
Result := DoReadString(RootSection, Ident, DefaultValue);
|
||||
finally
|
||||
FreeStorage;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomPropertyStorage.WriteString(const Ident, Value: string);
|
||||
begin
|
||||
StorageNeeded(False);
|
||||
DoWriteString(RootSection, Ident, Value);
|
||||
try
|
||||
DoWriteString(RootSection, Ident, Value);
|
||||
finally
|
||||
FreeStorage;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCustomPropertyStorage.ReadInteger(const Ident: string; DefaultValue: Longint): Longint;
|
||||
|
Loading…
Reference in New Issue
Block a user