lcl: repair TCustomPropertyStorage StorageNeeded balance with FreeStorage (fixes bug #0013239)

git-svn-id: trunk@19196 -
This commit is contained in:
paul 2009-04-01 22:26:56 +00:00
parent da507228d2
commit e9adbdad62

View File

@ -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;