summaryrefslogtreecommitdiff
path: root/girepository/givfuncinfo.c
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@gnome.org>2023-11-08 23:42:44 +0000
committerPhilip Withnall <pwithnall@gnome.org>2023-12-12 16:58:04 +0000
commit7d90780bbb383352d5036a4f475c8da6a9382a3a (patch)
tree918e937797d9c07cb49df758fdc6070a9ea6226d /girepository/givfuncinfo.c
parente79310e1d23c17f9821e928b110c55ee475db218 (diff)
givfuncinfo: Fix crash in GIVFuncInfo if a GError isn’t passed
Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3155
Diffstat (limited to 'girepository/givfuncinfo.c')
-rw-r--r--girepository/givfuncinfo.c10
1 files 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,