mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
gvariant: Add guard to g_variant_get()
Even if g_variant_get_va(), which we eventually call, checks on the validity of the value argument, check it early to avoid surprises, such as this intermittent FreeBSD test failure: (/var/tmp/gitlab_runner/builds/3fe11159/0/GNOME/glib/_build/gio/tests/gdbus-connection:65788): GLib-CRITICAL **: 15:13:25.670: g_variant_get_va: assertion 'value != NULL' failed
This commit is contained in:
parent
75e29305b8
commit
43d3d49234
@ -5434,6 +5434,7 @@ g_variant_get (GVariant *value,
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
g_return_if_fail (value != NULL);
|
||||
g_return_if_fail (valid_format_string (format_string, TRUE, value));
|
||||
|
||||
/* if any direct-pointer-access formats are in use, flatten first */
|
||||
|
Loading…
Reference in New Issue
Block a user