givfuncinfo: Fix crash in GIVFuncInfo if a GError isn’t passed

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
This commit is contained in:
Philip Withnall 2023-11-08 23:42:44 +00:00
parent e79310e1d2
commit 7d90780bbb

View File

@ -339,10 +339,14 @@ gi_vfunc_info_invoke (GIVFuncInfo *info,
GError **error)
{
gpointer func;
GError *local_error = NULL;
func = gi_vfunc_info_get_address (info, implementor, error);
if (*error != NULL)
func = gi_vfunc_info_get_address (info, implementor, &local_error);
if (local_error != NULL)
{
g_propagate_error (error, g_steal_pointer (&local_error));
return FALSE;
}
return gi_callable_info_invoke ((GICallableInfo*) info,
func,