mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 16:30:15 +00:00
gtkfilesystem: protect against null filesystem type
The filesystem:type attribute could be NULL, then g_strv_contains will crash if that happens. Just don't call it if the attribute is not set.
This commit is contained in:
parent
f10c0da36c
commit
c929e98fba
@ -947,7 +947,10 @@ _gtk_file_consider_as_remote (GFile *file)
|
||||
const gchar *type;
|
||||
|
||||
type = g_file_info_get_attribute_string (info, "filesystem::type");
|
||||
is_remote = g_strv_contains (remote_types, type);
|
||||
if (type != NULL)
|
||||
is_remote = g_strv_contains (remote_types, type);
|
||||
else
|
||||
is_remote = FALSE;
|
||||
|
||||
g_object_unref (info);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user