Amiga: avoid use after free

Use the scheduler to trigger page info close as that does not allow the same event to be in the queue multiple times
This commit is contained in:
Chris Young 2020-05-25 13:46:26 +01:00
parent 8924f0c7f9
commit 44e5aea7b5
1 changed files with 3 additions and 3 deletions

View File

@ -99,9 +99,9 @@ static BOOL
ami_pageinfo_event(struct ami_corewindow *ami_cw, ULONG result)
{
if((result & WMHI_CLASSMASK) == WMHI_INACTIVE) {
/* Window went inactive, so close it */
ami_pageinfo_destroy(ami_cw);
return TRUE;
/* Window went inactive, so schedule to close it */
ami_schedule(0, ami_pageinfo_close_cb, pageinfo_win);
/* NB: do not return TRUE here as we're still open for now */
}
return FALSE;
}