mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-26 00:09:41 +03:00
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:
parent
8924f0c7f9
commit
44e5aea7b5
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user