summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-08-11 21:34:46 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2016-08-11 21:34:46 (GMT)
commit0b67394618b38a299dab9b65b66d7981f0df46e0 (patch)
tree55ebf285ce4e5577ae6d8615b3e7af05ff087fe5
parentc80551b64b57b6200bd0ea012dd14118725ad64d (diff)
downloadnetsurf-0b67394618b38a299dab9b65b66d7981f0df46e0.tar.gz
netsurf-0b67394618b38a299dab9b65b66d7981f0df46e0.tar.bz2
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.
-rw-r--r--frontends/amiga/gui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 8672a93..7e5eadc 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -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);