mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 10:29:21 +02:00
* moved the s1,s2,s3 scanline memory allocation in FloodFill before changing
CurrentColor, so it doesn't get changed if the function exits prematurely due to out of memory git-svn-id: trunk@40971 -
This commit is contained in:
parent
003a08f040
commit
f356add031
@ -443,11 +443,6 @@ var
|
||||
exit;
|
||||
end;
|
||||
FillChar(DrawnList^,sizeof(PFloodLine)*((ViewHeight div YResDiv) + 1),0);
|
||||
{ init prevy }
|
||||
prevy := 32767;
|
||||
{ Save current drawing color }
|
||||
BackupColor := CurrentColor;
|
||||
CurrentColor := FillSettings.Color;
|
||||
{ MaxX is based on zero index }
|
||||
{$ifdef FPC_GRAPH_SUPPORTS_TRUECOLOR}
|
||||
if MaxColor > 65536 then
|
||||
@ -468,6 +463,11 @@ var
|
||||
_GraphResult := grNoFloodMem;
|
||||
exit;
|
||||
end;
|
||||
{ init prevy }
|
||||
prevy := 32767;
|
||||
{ Save current drawing color }
|
||||
BackupColor := CurrentColor;
|
||||
CurrentColor := FillSettings.Color;
|
||||
{ Index of points to check }
|
||||
Buffer.WordIndex:=0;
|
||||
PushPoint (x,y);
|
||||
|
Loading…
Reference in New Issue
Block a user