mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 12:30:59 +02:00
LCL: Fix memory allocation by TCustomImageListResolution (patch by Ondrej Pokorny, issue #34708, see also https://forum.lazarus.freepascal.org/index.php/topic,43525.msg305115.html#msg305115).
git-svn-id: trunk@59880 -
This commit is contained in:
parent
8fe535d1e4
commit
5fabf10223
@ -326,14 +326,13 @@ begin
|
||||
if n <> 0
|
||||
then Inc(ACount, FImageList.FAllocBy - n);
|
||||
|
||||
SetLength(FData, ACount * FWidth * FHeight * SizeOf(FData[0]));
|
||||
|
||||
Inc(FAllocCount, ACount);
|
||||
SetLength(FData, ACount * FWidth * FHeight);
|
||||
FAllocCount := ACount;
|
||||
end;
|
||||
|
||||
procedure TCustomImageListResolution.CheckIndex(AIndex: Integer;
|
||||
AForInsert: Boolean);
|
||||
// aviod exceptionframe generation
|
||||
// avoid exceptionframe generation
|
||||
procedure Error;
|
||||
begin
|
||||
raise EInvalidOperation.Create(SInvalidIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user