mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-22 10:22:06 +03:00
Fix crash when building error page -- fetch will be NULL, so fetch_get_referer will fail.
svn path=/trunk/netsurf/; revision=3476
This commit is contained in:
parent
c1531c449f
commit
81f3fcbafd
@ -564,7 +564,8 @@ bool content_set_type(struct content *c, content_type type,
|
||||
c->user_list->next->next) {
|
||||
/* type not shareable, and more than one user: split into
|
||||
* a content per user */
|
||||
const char *referer = fetch_get_referer(c->fetch);
|
||||
const char *referer =
|
||||
c->fetch ? fetch_get_referer(c->fetch) : NULL;
|
||||
|
||||
while (c->user_list->next->next) {
|
||||
clone = content_create(c->url);
|
||||
|
@ -533,6 +533,8 @@ long fetch_http_code(struct fetch *fetch)
|
||||
*/
|
||||
const char *fetch_get_referer(struct fetch *fetch)
|
||||
{
|
||||
assert(fetch);
|
||||
|
||||
return fetch->referer;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user