mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Bug 595138 - GFile not robust with invalid input
Improve handling of g_file_query_default_handler() when called on an invalid GFile (ie: one created with an invalid URI).
This commit is contained in:
parent
5d97ea2986
commit
9681d7e75f
@ -5999,7 +5999,7 @@ g_file_query_default_handler (GFile *file,
|
||||
char *path;
|
||||
|
||||
uri_scheme = g_file_get_uri_scheme (file);
|
||||
if (uri_scheme)
|
||||
if (uri_scheme && uri_scheme[0] != '\0')
|
||||
{
|
||||
appinfo = g_app_info_get_default_for_uri_scheme (uri_scheme);
|
||||
g_free (uri_scheme);
|
||||
|
Loading…
Reference in New Issue
Block a user