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:
parent
82a408da28
commit
823c26748a
@ -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);
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user