mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 19:22:11 +01:00
girepository: Add type check to instance parameter
gi_repository_enumerate_versions() was missing a type check of the instance parameter. This helps catch mistakes when porting from girepository 1.x where the parameter was allowed to be null.
This commit is contained in:
parent
3f4e6ddcd8
commit
f19115213a
@ -1653,6 +1653,8 @@ gi_repository_enumerate_versions (GIRepository *repository,
|
||||
const char *loaded_version;
|
||||
char **ret;
|
||||
|
||||
g_return_val_if_fail (GI_IS_REPOSITORY (repository), NULL);
|
||||
|
||||
candidates = enumerate_namespace_versions (namespace_,
|
||||
(const char * const *) repository->typelib_search_path->pdata,
|
||||
repository->typelib_search_path->len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user