Browser window: Handle counting cookies when URLdb gives use none.

This commit is contained in:
Michael Drake 2020-05-23 22:28:00 +01:00
parent b6bac9a81c
commit 0432d95561

View File

@ -4780,8 +4780,11 @@ browser_window_get_ssl_chain(struct browser_window *bw,
int browser_window_get_cookie_count(
const struct browser_window *bw)
{
char *cookies = urldb_get_cookie(browser_window_access_url(bw), true);
int count = 0;
char *cookies = urldb_get_cookie(browser_window_access_url(bw), true);
if (cookies == NULL) {
return 0;
}
for (char *c = cookies; *c != '\0'; c++) {
if (*c == ';')