1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

delayed_goto_uri: Do not segfault when there is no location yet.

The segfault was while reading the "copiousoutput" document on startup.
This commit is contained in:
Witold Filipczyk 2007-03-14 14:00:22 +01:00 committed by Witold Filipczyk
parent 82a408da28
commit 823c26748a

View File

@ -668,15 +668,18 @@ void
delayed_goto_uri_frame(void *data)
{
struct delayed_open *deo = data;
struct frame *frame;
struct frame *frame = NULL;
assert(deo);
frame = ses_find_frame(deo->ses, deo->target);
if (deo->target)
frame = ses_find_frame(deo->ses, deo->target);
if (frame)
goto_uri_frame(deo->ses, deo->uri, frame->name, CACHE_MODE_NORMAL);
else {
goto_uri_frame(deo->ses, deo->uri, NULL, CACHE_MODE_NORMAL);
}
done_uri(deo->uri);
mem_free_if(deo->target);
mem_free(deo);