Prevent gwinGetStyle() being called on a non-widget

ugfx_release_2.6
inmarket 2014-05-01 13:54:38 +10:00
parent cf548f0e9c
commit 96cec5349a
1 changed files with 3 additions and 0 deletions

View File

@ -371,6 +371,9 @@ void gwinSetStyle(GHandle gh, const GWidgetStyle *pstyle) {
}
const GWidgetStyle *gwinGetStyle(GHandle gh) {
if (!(gh->flags & GWIN_FLG_WIDGET))
return 0;
return gw->pstyle;
}