Prevent gwinGetStyle() being called on a non-widget
This commit is contained in:
parent
cf548f0e9c
commit
96cec5349a
1 changed files with 3 additions and 0 deletions
|
@ -371,6 +371,9 @@ void gwinSetStyle(GHandle gh, const GWidgetStyle *pstyle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const GWidgetStyle *gwinGetStyle(GHandle gh) {
|
const GWidgetStyle *gwinGetStyle(GHandle gh) {
|
||||||
|
if (!(gh->flags & GWIN_FLG_WIDGET))
|
||||||
|
return 0;
|
||||||
|
|
||||||
return gw->pstyle;
|
return gw->pstyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue