Fix bug where freed memory is written to.

remotes/origin_old/ugfx_release_2.6
inmarket 2013-09-19 08:28:26 +10:00
parent 15a09de659
commit bbed625a2a
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) {