aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-05-09 21:32:29 +1000
committerinmarket <andrewh@inmarket.com.au>2014-05-09 21:32:29 +1000
commit6d2c8f0f509f2e66d4fea444ce220550a0df6da5 (patch)
tree9ae2a5d837d37ca035e7a9acbce4b1067da0da4c /src
parentc475d69a9cbf8d2796904140dbf0f2d9d1d1220f (diff)
downloaduGFX-6d2c8f0f509f2e66d4fea444ce220550a0df6da5.tar.gz
uGFX-6d2c8f0f509f2e66d4fea444ce220550a0df6da5.tar.bz2
uGFX-6d2c8f0f509f2e66d4fea444ce220550a0df6da5.zip
GWIN creation and destruction bug fixes
Diffstat (limited to 'src')
-rw-r--r--src/gwin/class_gwin.h2
-rw-r--r--src/gwin/gwin.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gwin/class_gwin.h b/src/gwin/class_gwin.h
index 49fc6084..50dd480e 100644
--- a/src/gwin/class_gwin.h
+++ b/src/gwin/class_gwin.h
@@ -170,7 +170,7 @@ extern "C" {
*
* @notapi
*/
-GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint16_t flags);
+GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint32_t flags);
#if GWIN_NEED_WIDGET || defined(__DOXYGEN__)
/**
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index 93c17f3a..84443f9f 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -114,7 +114,7 @@ void _gwinDeinit(void)
// Internal routine for use by GWIN components only
// Initialise a window creating it dynamically if required.
-GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint16_t flags) {
+GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint32_t flags) {
// Allocate the structure if necessary
if (!pgw) {
if (!(pgw = gfxAlloc(vmt->size)))
@@ -197,6 +197,9 @@ GHandle gwinGWindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pI
}
void gwinDestroy(GHandle gh) {
+ if (!gh)
+ return;
+
// Make the window invisible
gwinSetVisible(gh, FALSE);