Browse Source

Fixing crash when passing NULL to gwinSetStyle()

spinbox_widget
Joel Bodenmann 5 years ago
parent
commit
0c695b2471
  1. 1
      docs/releases.txt
  2. 4
      src/gwin/gwin_widget.c

1
docs/releases.txt

@ -6,6 +6,7 @@
*** Changes after 2.6 ***
FEATURE: Added EXC7200 driver
FEATURE: Added STM32F439i-EVAL board files
FIX: Fixed crash when passing NULL to gwinSetStyle()
*** Release 2.6 ***

4
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);
}

Loading…
Cancel
Save