mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 20:58:14 +02:00
fixed mem leak of tooltips in GetStyle
git-svn-id: trunk@2176 -
This commit is contained in:
parent
580ed15e88
commit
abcd6ea5cc
@ -3243,6 +3243,7 @@ begin
|
|||||||
l:=IndexOfStyle(WName);
|
l:=IndexOfStyle(WName);
|
||||||
If l < 0 then begin
|
If l < 0 then begin
|
||||||
StyleObject := NewStyleObject;
|
StyleObject := NewStyleObject;
|
||||||
|
Tp:=nil;
|
||||||
If AnsiCompareText(WName,'button')=0 then
|
If AnsiCompareText(WName,'button')=0 then
|
||||||
StyleObject^.Widget := GTK_BUTTON_NEW
|
StyleObject^.Widget := GTK_BUTTON_NEW
|
||||||
else
|
else
|
||||||
@ -3300,7 +3301,7 @@ begin
|
|||||||
else
|
else
|
||||||
If AnsiCompareText(WName,'default')<>0 then
|
If AnsiCompareText(WName,'default')<>0 then
|
||||||
Result := GetStyle('default');
|
Result := GetStyle('default');
|
||||||
If AnsiCompareText(WName,'tooltip')=0 then
|
If Tp<>nil then
|
||||||
GTK_Object_Destroy(Tp);
|
GTK_Object_Destroy(Tp);
|
||||||
end else
|
end else
|
||||||
Result := PStyleObject(Styles.Objects[l])^.Style;
|
Result := PStyleObject(Styles.Objects[l])^.Style;
|
||||||
@ -3948,6 +3949,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.154 2002/12/22 23:13:31 mattias
|
||||||
|
fixed mem leak of tooltips in GetStyle
|
||||||
|
|
||||||
Revision 1.153 2002/12/22 22:42:55 mattias
|
Revision 1.153 2002/12/22 22:42:55 mattias
|
||||||
custom controls now support child wincontrols
|
custom controls now support child wincontrols
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user