Fix bug where freed memory is written to.

ugfx_release_2.6
inmarket 2013-09-19 08:28:26 +10:00
parent b25ac5e667
commit 40ec5a4e52
1 changed files with 4 additions and 3 deletions

View File

@ -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) {