diff options
author | Christian Hergert <chergert@redhat.com> | 2022-08-18 14:10:14 -0700 |
---|---|---|
committer | Christian Hergert <chergert@redhat.com> | 2022-08-18 14:11:10 -0700 |
commit | 8007883516f44f2d6da65a0d4998c43e44f464ba (patch) | |
tree | babaa7f8a46d4fe8b405b27520f22425c63da559 | |
parent | 3e335c9e9257c05a000a891422f5cc28c1f77d4b (diff) | |
download | libpeas-8007883516f44f2d6da65a0d4998c43e44f464ba.tar.gz |
engine: add assertion for GLib pre-2.44
We realistically aren't running on these systems, but we might as well be
explicit with the comment so that people know what the comment was
referring to.
-rw-r--r-- | libpeas/peas-engine.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libpeas/peas-engine.c b/libpeas/peas-engine.c index c0ccae8..a2202a5 100644 --- a/libpeas/peas-engine.c +++ b/libpeas/peas-engine.c @@ -167,6 +167,14 @@ plugin_info_add_sorted (GQueue *plugin_list, peas_plugin_info_get_module_name (info), peas_plugin_info_get_module_name (furthest_dep->data)); + /* GLib only accepts NULL for g_queue_insert_after() at + * version 2.44 and above so make sure NULL is handled + * before reaching here. + */ +#if !GLIB_CHECK_VERSION(2,44,0) + g_assert (furthest_dep != NULL); +#endif + g_queue_insert_after (plugin_list, furthest_dep, info); } |