summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2003-12-28 16:17:31 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2003-12-28 16:17:31 +0000
commit3a8b8485adc6a0e5e1d8182b64951d077b842093 (patch)
tree885717e731d48046b5a54583a81fda17fdf7b94e /riscos
parentb0b2ec850f74d3dd8bd2fffa76fbd2af20b42705 (diff)
downloadnetsurf-3a8b8485adc6a0e5e1d8182b64951d077b842093.tar.gz
netsurf-3a8b8485adc6a0e5e1d8182b64951d077b842093.tar.bz2
[project @ 2003-12-28 16:17:31 by jmb]
Fix bug in HTTP auth where trying to fetch a page into a non-existent browser window caused NetSurf to fall over. We now check that the window still exists. If not, we ignore the request. svn path=/import/netsurf/; revision=464
Diffstat (limited to 'riscos')
-rw-r--r--riscos/window.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/riscos/window.c b/riscos/window.c
index 01a8a5b96..ed7dddc5b 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -12,6 +12,7 @@
*/
#include <assert.h>
+#include <stdbool.h>
#include <string.h>
#include "oslib/wimp.h"
#include "oslib/wimpspriteop.h"
@@ -24,6 +25,21 @@
gui_window *window_list = 0;
+/**
+ * Checks if a window still exists.
+ */
+bool gui_window_in_list(gui_window *g) {
+
+ gui_window *temp;
+
+ if (g == window_list) return true;
+
+ for(temp=window_list; temp->next != g && temp->next!=0; temp=temp->next) ;
+
+ if (temp->next == NULL) return false;
+
+ return true;
+}
/**
* Create and open a new browser window.