From 7d90780bbb383352d5036a4f475c8da6a9382a3a Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 8 Nov 2023 23:42:44 +0000 Subject: [PATCH] =?UTF-8?q?givfuncinfo:=20Fix=20crash=20in=20GIVFuncInfo?= =?UTF-8?q?=20if=20a=20GError=20isn=E2=80=99t=20passed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philip Withnall Helps: #3155 --- girepository/givfuncinfo.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/girepository/givfuncinfo.c b/girepository/givfuncinfo.c index 710aad691..f29e7d49d 100644 --- a/girepository/givfuncinfo.c +++ b/girepository/givfuncinfo.c @@ -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) - return FALSE; + 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,