diff options
Diffstat (limited to 'src/gwin')
-rw-r--r-- | src/gwin/gwin.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c index 998fb8d3..44d4143c 100644 --- a/src/gwin/gwin.c +++ b/src/gwin/gwin.c @@ -172,10 +172,11 @@ void gwinDestroy(GHandle gh) { gh->vmt->Destroy(gh); // Clean up the structure - if (gh->flags & GWIN_FLG_DYNAMIC) + if (gh->flags & GWIN_FLG_DYNAMIC) { + gh->flags = 0; // To be sure, to be sure gfxFree((void *)gh); - - gh->flags = 0; // To be sure, to be sure + } else + gh->flags = 0; // To be sure, to be sure } const char *gwinGetClassName(GHandle gh) { |