mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-07 00:05:56 +02:00
gtk2: fixed mem leak
git-svn-id: trunk@42388 -
This commit is contained in:
parent
f4aba6fdf1
commit
2dcaeb39e0
@ -1357,6 +1357,7 @@ var
|
|||||||
AttrListTemporary: Boolean;
|
AttrListTemporary: Boolean;
|
||||||
Attr: PPangoAttribute;
|
Attr: PPangoAttribute;
|
||||||
CurFont: PPangoLayout;
|
CurFont: PPangoLayout;
|
||||||
|
TmpStr: PChar;
|
||||||
begin
|
begin
|
||||||
{$IFDEF VerboseFonts}
|
{$IFDEF VerboseFonts}
|
||||||
DebugLn('TGtk2WidgetSet.CreateFontIndirectEx A Name=',LogFont.lfFaceName,' Height=',dbgs(LogFont.lfHeight),' LongName=',LongFontName);
|
DebugLn('TGtk2WidgetSet.CreateFontIndirectEx A Name=',LogFont.lfFaceName,' Height=',dbgs(LogFont.lfHeight),' LongName=',LongFontName);
|
||||||
@ -1467,7 +1468,9 @@ begin
|
|||||||
if (pango_font_description_get_style (PangoDesc) = PANGO_STYLE_NORMAL)
|
if (pango_font_description_get_style (PangoDesc) = PANGO_STYLE_NORMAL)
|
||||||
and (lfItalic <> 0) then
|
and (lfItalic <> 0) then
|
||||||
pango_font_description_set_style(PangoDesc, PANGO_STYLE_ITALIC);
|
pango_font_description_set_style(PangoDesc, PANGO_STYLE_ITALIC);
|
||||||
aStyle := pango_font_description_to_string(PangoDesc);
|
TmpStr := pango_font_description_to_string(PangoDesc);
|
||||||
|
aStyle := TmpStr;
|
||||||
|
g_free(TmpStr);
|
||||||
if (aSize=0) and (lfHeight<>0) then
|
if (aSize=0) and (lfHeight<>0) then
|
||||||
begin
|
begin
|
||||||
// a size is not specified, try to calculate one based on lfHeight
|
// a size is not specified, try to calculate one based on lfHeight
|
||||||
|
Loading…
Reference in New Issue
Block a user