Fix bug where freed memory is written to.

This commit is contained in:
inmarket 2013-09-19 08:28:26 +10:00
parent 15a09de659
commit bbed625a2a

View file

@ -172,9 +172,10 @@ void gwinDestroy(GHandle gh) {
gh->vmt->Destroy(gh); gh->vmt->Destroy(gh);
// Clean up the structure // 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); gfxFree((void *)gh);
} else
gh->flags = 0; // To be sure, to be sure gh->flags = 0; // To be sure, to be sure
} }