diff --git a/gio/gosxcontenttype.c b/gio/gosxcontenttype.c index b646f6e57..347477577 100644 --- a/gio/gosxcontenttype.c +++ b/gio/gosxcontenttype.c @@ -90,9 +90,10 @@ static gchar * create_cstr_from_cfstring_with_fallback (CFStringRef str, const gchar *fallback) { - gchar *cstr; + gchar *cstr = NULL; - cstr = create_cstr_from_cfstring (str); + if (str) + cstr = create_cstr_from_cfstring (str); if (!cstr) return g_strdup (fallback);