summaryrefslogtreecommitdiff
path: root/riscos/window.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-10-18 18:01:39 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-10-18 18:01:39 +0100
commit6d0746987d407f09d500557d9512850477687505 (patch)
tree40bc6f272c8fbb85df47e8b948dc4c6d0eed5f85 /riscos/window.c
parent2f67de688966b09136f1964f0317d29daa1cde92 (diff)
downloadnetsurf-6d0746987d407f09d500557d9512850477687505.tar.gz
netsurf-6d0746987d407f09d500557d9512850477687505.tar.bz2
Use core API to acquire content, rather than poking inside the bw.
Diffstat (limited to 'riscos/window.c')
-rw-r--r--riscos/window.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/riscos/window.c b/riscos/window.c
index 123b32322..b28db8074 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -4013,11 +4013,16 @@ void ro_gui_window_action_local_history(struct gui_window *g)
void ro_gui_window_action_save(struct gui_window *g, gui_save_type save_type)
{
- if (g == NULL || g->bw == NULL || g->bw->current_content == NULL)
+ hlcache_handle *h;
+
+ if (g == NULL || g->bw == NULL || !browser_window_has_content(g->bw))
+ return;
+
+ h = browser_window_get_content(g->bw);
+ if (h == NULL)
return;
- ro_gui_save_prepare(save_type, g->bw->current_content,
- NULL, NULL, NULL);
+ ro_gui_save_prepare(save_type, h, NULL, NULL, NULL);
ro_gui_dialog_open_persistent(g->window, dialog_saveas, true);
}