Commit a350fa50 authored by Philip Withnall's avatar Philip Withnall

Merge branch 'winhttp-handle-null-prgname' into 'master'

gwinhttpvfs: Handle g_get_prgname() returning NULL

See merge request !1152
parents 419b7d00 bf2a1021
Pipeline #121434 failed with stages
in 21 minutes and 19 seconds
......@@ -121,12 +121,13 @@ static void
g_winhttp_vfs_init (GWinHttpVfs *vfs)
{
wchar_t *wagent;
const gchar *prgname = g_get_prgname ();
vfs->wrapped_vfs = g_vfs_get_local ();
wagent = g_utf8_to_utf16 (g_get_prgname (), -1, NULL, NULL, NULL);
if (!wagent)
if (prgname)
wagent = g_utf8_to_utf16 (prgname, -1, NULL, NULL, NULL);
else
wagent = g_utf8_to_utf16 ("GWinHttpVfs", -1, NULL, NULL, NULL);
vfs->session = (G_WINHTTP_VFS_GET_CLASS (vfs)->funcs->pWinHttpOpen)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment