From 3a9fa29ee53bef70a0e643847acc2fb374501f70 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 6 Jul 2014 18:34:34 +0100 Subject: try and improve usage of browser window internals --- amiga/menu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'amiga/menu.c') diff --git a/amiga/menu.c b/amiga/menu.c index c1e863a65..70028af68 100644 --- a/amiga/menu.c +++ b/amiga/menu.c @@ -893,8 +893,12 @@ static void ami_menu_item_edit_copy(struct Hook *hook, APTR window, struct Intui } else if(bm = content_get_bitmap(gwin->bw->current_content)) { - bm->url = (char *)nsurl_access(hlcache_handle_get_url(gwin->bw->current_content)); - bm->title = (char *)content_get_title(gwin->bw->current_content); + /** @todo It should be checked that the lifetime of + * the objects containing the values returned (and the + * constness cast away) is safe. + */ + bm->url = (char *)nsurl_access(browser_window_get_url(gwin->bw)); + bm->title = (char *)browser_window_get_title(gwin->bw); ami_easy_clipboard_bitmap(bm); } #ifdef WITH_NS_SVG -- cgit v1.2.3