mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 17:56:17 +01:00
gio: Eliminate warnings in cstring conversion on OS X
create_cstr_from_cfstring_with_fallback() is allowed to be called when str == NULL but create_cstr_from_cfstring() isn't which leads to warnings in the console. Fix this by adding NULL checks into create_cstr_from_cfstring_with_fallback(). https://bugzilla.gnome.org/show_bug.cgi?id=788936
This commit is contained in:
parent
6acaca8831
commit
9bcd7800a1
@ -90,8 +90,9 @@ static gchar *
|
|||||||
create_cstr_from_cfstring_with_fallback (CFStringRef str,
|
create_cstr_from_cfstring_with_fallback (CFStringRef str,
|
||||||
const gchar *fallback)
|
const gchar *fallback)
|
||||||
{
|
{
|
||||||
gchar *cstr;
|
gchar *cstr = NULL;
|
||||||
|
|
||||||
|
if (str)
|
||||||
cstr = create_cstr_from_cfstring (str);
|
cstr = create_cstr_from_cfstring (str);
|
||||||
if (!cstr)
|
if (!cstr)
|
||||||
return g_strdup (fallback);
|
return g_strdup (fallback);
|
||||||
|
Loading…
Reference in New Issue
Block a user