[lazarus] New Bug Entered

andrew johnson acjgenius at earthlink.net
Mon Oct 28 15:59:12 EST 2002

On Mon, 2002-10-28 at 15:39
Jeroen van Iddekinge wrote:

> Title: Unitialised variables and memory leak
> Entered by: Jeroen van Iddekinge
> 1) In TGtkObject.InitStockItems the function CreateBrushIndirect is called.  logbrush.lbStyle is set to bs_null , but logbrush.lbColor is not set and is therefor unitialised. lbColor should be set because it is used in CreateBrushIndirect in a call to GetGDIolorRef

CreateBrushIndirect should not be calling to get the color for a null
brush. This is known, and I have a minor fix I will be commiting soon to
redesign Brush's to act like Pens, aka If IsNullBrush then ... else ...

> 2) TGtkObject.FillScreenFont, memory leak
> XFreeFontNames(theFonts) should be added. 


> 3) TGtkObject.SelectClipRgn.
> The first lines of this routine is:
> if not isValidDc(DC) then
>   Result := Error;
> if Result <> Error then
> This should be something like:
> Error := 0
> if not IsValidDc(DC) then
>     Result := Error;
> if Result <> Error then

This is not a bug, ERROR is a Win32 defined const, which is declared 


More information about the Lazarus mailing list