mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 06:29:16 +02:00
* added check to ensure the memory allocation for DrawnList inside FloodFill hasn't returned nil
git-svn-id: trunk@40964 -
This commit is contained in:
parent
f322b45611
commit
e6835e8ff7
@ -435,6 +435,11 @@ var
|
|||||||
x1, x2, prevy: smallint;
|
x1, x2, prevy: smallint;
|
||||||
Begin
|
Begin
|
||||||
GetMem(DrawnList,sizeof(PFloodLine)*((ViewHeight div YResDiv) + 1));
|
GetMem(DrawnList,sizeof(PFloodLine)*((ViewHeight div YResDiv) + 1));
|
||||||
|
if not assigned(DrawnList) then
|
||||||
|
begin
|
||||||
|
_GraphResult := grNoFloodMem;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
FillChar(DrawnList^,sizeof(PFloodLine)*((ViewHeight div YResDiv) + 1),0);
|
FillChar(DrawnList^,sizeof(PFloodLine)*((ViewHeight div YResDiv) + 1),0);
|
||||||
{ init prevy }
|
{ init prevy }
|
||||||
prevy := 32767;
|
prevy := 32767;
|
||||||
|
Loading…
Reference in New Issue
Block a user