* 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:
nickysn 2019-01-21 14:47:48 +00:00
parent f322b45611
commit e6835e8ff7

View File

@ -435,6 +435,11 @@ var
x1, x2, prevy: smallint;
Begin
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);
{ init prevy }
prevy := 32767;