diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-08-29 00:27:52 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-08-29 00:27:52 +0000 |
commit | b82546a39f6fad667d155b2d402e79e8617d7c23 (patch) | |
tree | 9160bb1ce51cdbda471a43065bc68bd72209e97d /riscos/url_complete.c | |
parent | 3af1dbdb127283b64058c3b842932197a5c777b3 (diff) | |
download | netsurf-b82546a39f6fad667d155b2d402e79e8617d7c23.tar.gz netsurf-b82546a39f6fad667d155b2d402e79e8617d7c23.tar.bz2 |
Probably fix crash on clicking in url completion dialogue.
URL completion really needs revisiting, as it's full of side effects and has weird and wonderful interactions with other parts of the system.
svn path=/trunk/netsurf/; revision=3535
Diffstat (limited to 'riscos/url_complete.c')
-rw-r--r-- | riscos/url_complete.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/riscos/url_complete.c b/riscos/url_complete.c index d30443cf5..9085ba85c 100644 --- a/riscos/url_complete.c +++ b/riscos/url_complete.c @@ -720,12 +720,22 @@ bool ro_gui_url_complete_click(wimp_pointer *pointer) ICON_TOOLBAR_URL, url_complete_matches[ url_complete_matches_selection]); - browser_window_go(g->bw, + global_history_add_recent(url_complete_matches[ + url_complete_matches_selection]); + + /** \todo The interaction of components here is hideous */ + /* Do NOT make any attempt to use any of the global url + * completion variables after this call to browser_window_go. + * They will be invalidated by (at least): + * + gui_window_set_url + * + destruction of (i)frames within the current page + * Any attempt to use them will probably result in a crash. + */ + + browser_window_go(g->bw, url_complete_matches[ url_complete_matches_selection], 0, true); - global_history_add_recent(url_complete_matches[ - url_complete_matches_selection]); ro_gui_url_complete_close(NULL, 0); /* Adjust just sets the text */ |