Skip to content

Commit

Permalink
Fix crash when no addresses provided in ComposeEmail
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-ancell committed Aug 2, 2022
1 parent 93e50a2 commit 31b030b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/email.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ compose_mail_mailto (GAppInfo *info,

sep = "?";

for (i = 0; addrs[i]; i++)
if (addrs)
{
if (i > 0)
g_string_append (url, ",");
g_string_append_printf (url, "%s", addrs[i]);
for (i = 0; addrs[i]; i++)
{
if (i > 0)
g_string_append (url, ",");
g_string_append_printf (url, "%s", addrs[i]);
}
}

if (cc)
Expand Down

0 comments on commit 31b030b

Please sign in to comment.