mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
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.
This commit is contained in:
parent
cf7abb4a0a
commit
1794ac0d33
@ -2188,9 +2188,11 @@ 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;
|
||||
if (cont.link_url != NULL) {
|
||||
nsurl_create(cont.link_url, ¤t_menu_url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Shade menu entries according to the state of the window and object
|
||||
* under the pointer.
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user