Fix bug where freed memory is written to.
This commit is contained in:
parent
15a09de659
commit
bbed625a2a
1 changed files with 4 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue