diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-05-01 13:54:38 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-05-01 13:54:38 +1000 |
commit | 96cec5349a40bb55b9c65e19234234d2ab197b48 (patch) | |
tree | 31928725bbb835cfa47d03c9782f3f673f270536 /src | |
parent | cf548f0e9c8a13741489a6b3368da1f8040301e2 (diff) | |
download | uGFX-96cec5349a40bb55b9c65e19234234d2ab197b48.tar.gz uGFX-96cec5349a40bb55b9c65e19234234d2ab197b48.tar.bz2 uGFX-96cec5349a40bb55b9c65e19234234d2ab197b48.zip |
Prevent gwinGetStyle() being called on a non-widget
Diffstat (limited to 'src')
-rw-r--r-- | src/gwin/gwidget.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gwin/gwidget.c b/src/gwin/gwidget.c index ad2b7b20..181b7425 100644 --- a/src/gwin/gwidget.c +++ b/src/gwin/gwidget.c @@ -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; } |