From 1202ad9c443dc5ac532b6b22d2b55fab019e08d9 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 30 Sep 2004 16:48:04 +0000 Subject: [project @ 2004-09-30 16:48:04 by jmb] Prevent crash when radio button outside a form block is selected. Make url bar update slightly more sane - doesn't update if the fetch is a download. svn path=/import/netsurf/; revision=1295 --- desktop/browser.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'desktop/browser.c') diff --git a/desktop/browser.c b/desktop/browser.c index 8ebb81bc5..f0c5b38a6 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -185,7 +185,6 @@ void browser_window_go_post(struct browser_window *bw, const char *url, return; } - gui_window_set_url(bw->window, c->url); bw->loading_content = c; browser_window_start_throbber(bw); @@ -210,6 +209,8 @@ void browser_window_callback(content_msg msg, struct content *c, if (c->type == CONTENT_OTHER) browser_window_convert_to_download(bw); + else + gui_window_set_url(bw->window, c->url); break; case CONTENT_MSG_READY: @@ -819,6 +820,10 @@ void browser_radio_set(struct content *content, { struct form_control *control; + /* some sanity checking */ + if (content == NULL || radio == NULL || radio->form == NULL) + return; + if (radio->selected) return; -- cgit v1.2.3