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)
|
delayed_goto_uri_frame(void *data)
|
||||||
{
|
{
|
||||||
struct delayed_open *deo = data;
|
struct delayed_open *deo = data;
|
||||||
struct frame *frame;
|
struct frame *frame = NULL;
|
||||||
|
|
||||||
assert(deo);
|
assert(deo);
|
||||||
frame = ses_find_frame(deo->ses, deo->target);
|
if (deo->target)
|
||||||
|
frame = ses_find_frame(deo->ses, deo->target);
|
||||||
|
|
||||||
if (frame)
|
if (frame)
|
||||||
goto_uri_frame(deo->ses, deo->uri, frame->name, CACHE_MODE_NORMAL);
|
goto_uri_frame(deo->ses, deo->uri, frame->name, CACHE_MODE_NORMAL);
|
||||||
else {
|
else {
|
||||||
goto_uri_frame(deo->ses, deo->uri, NULL, CACHE_MODE_NORMAL);
|
goto_uri_frame(deo->ses, deo->uri, NULL, CACHE_MODE_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
done_uri(deo->uri);
|
done_uri(deo->uri);
|
||||||
mem_free_if(deo->target);
|
mem_free_if(deo->target);
|
||||||
mem_free(deo);
|
mem_free(deo);
|
||||||
|
Loading…
Reference in New Issue
Block a user