forked from AuroraMiddleware/gtk
Merge branch 'bookmark-fix' into 'master'
gtkplacessidebar.c: add bookmark null checking See merge request GNOME/gtk!3479
This commit is contained in:
commit
604d171d56
@ -795,6 +795,9 @@ on_bookmark_query_info_complete (GObject *source,
|
|||||||
{
|
{
|
||||||
/* Don't add non-UTF-8 bookmarks */
|
/* Don't add non-UTF-8 bookmarks */
|
||||||
bookmark_name = g_file_get_basename (root);
|
bookmark_name = g_file_get_basename (root);
|
||||||
|
if (bookmark_name == NULL)
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (!g_utf8_validate (bookmark_name, -1, NULL))
|
if (!g_utf8_validate (bookmark_name, -1, NULL))
|
||||||
{
|
{
|
||||||
g_free (bookmark_name);
|
g_free (bookmark_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user