From 1794ac0d333acc61eda3424141d4722b7eab9a2b Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 1 Nov 2014 23:44:41 +0000 Subject: 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. --- riscos/window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'riscos') 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, ¤t_menu_url); + if (cont.link_url != NULL) { + nsurl_create(cont.link_url, ¤t_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); -- cgit v1.2.3