aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@embedded.pro>2016-08-07 20:38:55 +0200
committerJoel Bodenmann <joel@embedded.pro>2016-08-07 20:38:55 +0200
commit0c695b2471c347847e579aa19ada5612341bfc2d (patch)
tree991dbf00d682eec053758544410a2ab6febe38e3 /src/gwin
parent91f537c91ca877f03a3634e7de9423fe451ff06a (diff)
downloaduGFX-0c695b2471c347847e579aa19ada5612341bfc2d.tar.gz
uGFX-0c695b2471c347847e579aa19ada5612341bfc2d.tar.bz2
uGFX-0c695b2471c347847e579aa19ada5612341bfc2d.zip
Fixing crash when passing NULL to gwinSetStyle()
Diffstat (limited to 'src/gwin')
-rw-r--r--src/gwin/gwin_widget.c4
1 files changed, 2 insertions, 2 deletions
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);
}