mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 17:23:09 +03:00
Don't attempt to close a public screen we're not the owner of.
I've never been entirely clear on what the correct approach here is, but OS4 has a feature where it will auto open/close a public screen for you. In this case, in the microseconds between unlocking that screen and attempting to close it, OS4 has already disposed of the screen and NetSurf has crashed, so we assume the owner will handle the closing instead.
This commit is contained in:
parent
c80551b64b
commit
0b67394618
@ -3006,6 +3006,9 @@ static void ami_gui_close_screen(struct Screen *scrn, BOOL locked_screen, BOOL d
|
||||
locked_screen = FALSE;
|
||||
}
|
||||
|
||||
/* If this is our own screen, wait for visitor windows to close */
|
||||
if(screen_signal == -1) return;
|
||||
|
||||
if(CloseScreen(scrn) == TRUE) {
|
||||
if(screen_signal != -1) {
|
||||
FreeSignal(screen_signal);
|
||||
@ -3016,9 +3019,6 @@ static void ami_gui_close_screen(struct Screen *scrn, BOOL locked_screen, BOOL d
|
||||
}
|
||||
if(donotwait == TRUE) return;
|
||||
|
||||
/* If this is our own screen, wait for visitor windows to close */
|
||||
if(screen_signal == -1) return;
|
||||
|
||||
ULONG scrnsig = 1 << screen_signal;
|
||||
LOG("Waiting for visitor windows to close... (signal)");
|
||||
Wait(scrnsig);
|
||||
|
Loading…
Reference in New Issue
Block a user