Prevent gwinGetStyle() being called on a non-widget

This commit is contained in:
inmarket 2014-05-01 13:54:38 +10:00
parent cf548f0e9c
commit 96cec5349a

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