mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
GDesktopAppInfo: Ensure that URI scheme is a valid argument
This commit is contained in:
@@ -4626,6 +4626,8 @@ g_app_info_get_default_for_uri_scheme (const char *uri_scheme)
|
||||
GAppInfo *app_info;
|
||||
char *content_type, *scheme_down;
|
||||
|
||||
g_return_val_if_fail (uri_scheme != NULL && *uri_scheme != '\0', NULL);
|
||||
|
||||
scheme_down = g_ascii_strdown (uri_scheme, -1);
|
||||
content_type = g_strdup_printf ("x-scheme-handler/%s", scheme_down);
|
||||
g_free (scheme_down);
|
||||
|
Reference in New Issue
Block a user