mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-20 06:35:12 +01:00
Merge branch 'backport-1152-winhttpvfs-prgname-glib-2-62' into 'glib-2-62'
Backport !1152 “gwinhttpvfs: Handle g_get_prgname() returning NULL” to glib-2-62 See merge request GNOME/glib!1154
This commit is contained in:
commit
e605f779ab
@ -121,12 +121,13 @@ static void
|
|||||||
g_winhttp_vfs_init (GWinHttpVfs *vfs)
|
g_winhttp_vfs_init (GWinHttpVfs *vfs)
|
||||||
{
|
{
|
||||||
wchar_t *wagent;
|
wchar_t *wagent;
|
||||||
|
const gchar *prgname = g_get_prgname ();
|
||||||
|
|
||||||
vfs->wrapped_vfs = g_vfs_get_local ();
|
vfs->wrapped_vfs = g_vfs_get_local ();
|
||||||
|
|
||||||
wagent = g_utf8_to_utf16 (g_get_prgname (), -1, NULL, NULL, NULL);
|
if (prgname)
|
||||||
|
wagent = g_utf8_to_utf16 (prgname, -1, NULL, NULL, NULL);
|
||||||
if (!wagent)
|
else
|
||||||
wagent = g_utf8_to_utf16 ("GWinHttpVfs", -1, NULL, NULL, NULL);
|
wagent = g_utf8_to_utf16 ("GWinHttpVfs", -1, NULL, NULL, NULL);
|
||||||
|
|
||||||
vfs->session = (G_WINHTTP_VFS_GET_CLASS (vfs)->funcs->pWinHttpOpen)
|
vfs->session = (G_WINHTTP_VFS_GET_CLASS (vfs)->funcs->pWinHttpOpen)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user