mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 23:49:13 +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;
|
function TCustomPropertyStorage.ReadString(const Ident, DefaultValue: string): string;
|
||||||
begin
|
begin
|
||||||
StorageNeeded(True);
|
StorageNeeded(True);
|
||||||
Result := DoReadString(RootSection, Ident, DefaultValue);
|
try
|
||||||
|
Result := DoReadString(RootSection, Ident, DefaultValue);
|
||||||
|
finally
|
||||||
|
FreeStorage;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomPropertyStorage.WriteString(const Ident, Value: string);
|
procedure TCustomPropertyStorage.WriteString(const Ident, Value: string);
|
||||||
begin
|
begin
|
||||||
StorageNeeded(False);
|
StorageNeeded(False);
|
||||||
DoWriteString(RootSection, Ident, Value);
|
try
|
||||||
|
DoWriteString(RootSection, Ident, Value);
|
||||||
|
finally
|
||||||
|
FreeStorage;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomPropertyStorage.ReadInteger(const Ident: string; DefaultValue: Longint): Longint;
|
function TCustomPropertyStorage.ReadInteger(const Ident: string; DefaultValue: Longint): Longint;
|
||||||
|
Loading…
Reference in New Issue
Block a user