Fixing crash when passing NULL to gwinSetStyle()

spinbox_widget
Joel Bodenmann 2016-08-07 20:38:55 +02:00
parent 91f537c91c
commit 0c695b2471
2 changed files with 3 additions and 2 deletions

View File

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

View File

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