1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Bug 765: use load_uri to load old tab's document

Kalle reported that after commit 5c96d430c9,
ELinks would crash if the document in the old tab was still loading when a
new tab was opened.  The problem was that the new session's download.data
pointer was not updated to point to the session as doc_loading_callback
expects.

Instead of just calling render_document_frames, set up the download and
call load_uri.
This commit is contained in:
Miciah Dashiel Butler Masters 2008-07-12 05:52:26 +00:00
parent 82e67f8ebc
commit d6116ca83a

View File

@ -850,10 +850,12 @@ setup_session(struct session *ses, struct uri *uri, struct session *base)
struct location *loc = mem_calloc(1, sizeof(*loc));
if (loc) {
loc->download.state = connection_state(S_OK);
copy_location(loc, cur_loc(base));
loc->download.data = ses;
loc->download.callback = (download_callback_T *) doc_loading_callback;
add_to_history(&ses->history, loc);
render_document_frames(ses, 0);
load_uri(loc->vs.uri, NULL, &loc->download, PRI_MAIN,
CACHE_MODE_ALWAYS, -1);
}
}