mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 05:19:31 +02:00
gtk: In DrawFrameControl check if widget is nil before getting style to prevent gtk critical error messages
git-svn-id: trunk@23265 -
This commit is contained in:
parent
685da51f7b
commit
991f66b576
@ -2573,11 +2573,12 @@ var
|
||||
aDC:=TGtkDeviceContext(DC);
|
||||
DCOrigin:= aDC.Offset;
|
||||
|
||||
aStyle := gtk_widget_get_style(Widget);
|
||||
if aStyle=nil then
|
||||
If Widget <> nil then
|
||||
aStyle := gtk_widget_get_style(Widget)
|
||||
else
|
||||
aStyle := GetStyle(lgsButton);
|
||||
If aStyle = nil then
|
||||
aStyle := GetStyle(lgsGTK_Default);
|
||||
aStyle := GetStyle(lgsGTK_Default);
|
||||
|
||||
If State = GTK_STATE_SELECTED then
|
||||
State := GTK_STATE_ACTIVE;
|
||||
|
Loading…
Reference in New Issue
Block a user