[project @ 2004-08-07 12:58:46 by jmb]

Handle malloc failure

svn path=/import/netsurf/; revision=1191
This commit is contained in:
John Mark Bell 2004-08-07 12:58:46 +00:00
parent 2119440878
commit 3cfb34bc4a

View File

@ -654,6 +654,10 @@ void history_go(struct browser_window *bw, struct history_entry *entry)
if (entry->frag_id) {
url = calloc(strlen(entry->url) + strlen(entry->frag_id) + 5,
sizeof(char));
if (!url) {
warn_user("NoMemory", 0);
return;
}
sprintf(url, "%s#%s", entry->url, entry->frag_id);
}
else