mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16: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,
|
||||
const gchar *fallback)
|
||||
{
|
||||
gchar *cstr;
|
||||
gchar *cstr = NULL;
|
||||
|
||||
if (str)
|
||||
cstr = create_cstr_from_cfstring (str);
|
||||
if (!cstr)
|
||||
return g_strdup (fallback);
|
||||
|
Loading…
Reference in New Issue
Block a user