From 0c695b2471c347847e579aa19ada5612341bfc2d Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Sun, 7 Aug 2016 20:38:55 +0200 Subject: Fixing crash when passing NULL to gwinSetStyle() --- src/gwin/gwin_widget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gwin/gwin_widget.c b/src/gwin/gwin_widget.c index 483a63b3..c3704536 100644 --- a/src/gwin/gwin_widget.c +++ b/src/gwin/gwin_widget.c @@ -588,8 +588,8 @@ void gwinSetStyle(GHandle gh, const GWidgetStyle *pstyle) { return; gw->pstyle = pstyle ? pstyle : defaultStyle; - gh->bgcolor = pstyle->background; - gh->color = pstyle->enabled.text; + gh->bgcolor = gw->pstyle->background; + gh->color = gw->pstyle->enabled.text; _gwinUpdate(gh); } -- cgit v1.2.3