mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
gio: Check for NUll when getting extensions
When unregistered extension point (i.e. NULL pointer) is passed to `g_io_extension_point_get_extensions`, it causes a segfault. This commit adds an assertion, to prevent this. https://bugzilla.gnome.org/show_bug.cgi?id=779183
This commit is contained in:
parent
ee09bb704f
commit
1a845115a2
@ -1280,6 +1280,8 @@ lazy_load_modules (GIOExtensionPoint *extension_point)
|
||||
GList *
|
||||
g_io_extension_point_get_extensions (GIOExtensionPoint *extension_point)
|
||||
{
|
||||
g_return_val_if_fail (extension_point != NULL, NULL);
|
||||
|
||||
lazy_load_modules (extension_point);
|
||||
return extension_point->extensions;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user