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:
blikblum 2009-12-24 20:08:25 +00:00
parent 685da51f7b
commit 991f66b576

View File

@ -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;