summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-11-01 23:44:41 +0000
committerVincent Sanders <vince@kyllikki.org>2014-11-01 23:44:41 +0000
commit1794ac0d333acc61eda3424141d4722b7eab9a2b (patch)
treeb19221d771a1a8b88869863d48708feb0d7ba9bb /riscos
parentcf7abb4a0ad6a6de3acf3215ca6d31fdebbf4708 (diff)
downloadnetsurf-1794ac0d333acc61eda3424141d4722b7eab9a2b.tar.gz
netsurf-1794ac0d333acc61eda3424141d4722b7eab9a2b.tar.bz2
Do not attempt to convert an empty url on RISC OS menu click
When updating the RISC OS frontend to using nsurl for its menu operations (as part of getting rid of url_nice) the check for null (empty) url strings in the url under the mouse was omitted leading to a crash. Additionaly a use of url where current_menu_url was intended was missed leading to crashes when "open in new window" was used.
Diffstat (limited to 'riscos')
-rw-r--r--riscos/window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/riscos/window.c b/riscos/window.c
index a7c08b108..5c47e115c 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -2188,7 +2188,9 @@ bool ro_gui_window_menu_prepare(wimp_w w, wimp_i i, wimp_menu *menu,
current_menu_main = cont.main;
current_menu_object = cont.object;
- nsurl_create(cont.link_url, &current_menu_url);
+ if (cont.link_url != NULL) {
+ nsurl_create(cont.link_url, &current_menu_url);
+ }
}
}
@@ -2819,7 +2821,7 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
error = browser_window_create(
BW_CREATE_HISTORY |
BW_CREATE_CLONE,
- url,
+ current_menu_url,
browser_window_get_url(bw),
bw,
NULL);