summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2017-02-25 03:14:57 -0300
committerdequis <dx@dxzone.com.ar>2017-02-25 03:14:57 -0300
commit99e31624bf9e88b3002e05514db904d5aad35db6 (patch)
tree808b7980838bfc89a87c7cc8197270693c16b5ef
parent302329c7ae580b6769509695af4489a46addc10c (diff)
downloadbitlbee-facebook-99e31624bf9e88b3002e05514db904d5aad35db6.tar.gz
Fix crash when the error signal is raised and glib has G_ENABLE_DEBUG
If glib is built with --enable-debug=yes, it will have G_ENABLE_DEBUG set internally This flag changes the g_marshal_value_peek_object() macro to use g_value_get_object(), which performs sanity checks, instead of doing a direct offset access. The definition of our error signal was wrong, using a marshaller with a GObject in the first parameter but setting the type of the GValue to G_TYPE_ERROR. Since we have no marshaller for G_TYPE_ERROR, and that all of those are functionally equivalent (and in fact use the exact same code in non-debug builds), I went with POINTER for both sides. The actual crash happened because of a g_return_val_if_fail() in the sanity checks which made it return NULL after throwing a warning like this: g_value_get_object: assertion 'G_VALUE_HOLDS_OBJECT (value)' failed This was reported by a gentoo user who had the debug use flag. Thanks!
-rw-r--r--facebook/facebook-api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/facebook/facebook-api.c b/facebook/facebook-api.c
index a94f9af..eb0e8b4 100644
--- a/facebook/facebook-api.c
+++ b/facebook/facebook-api.c
@@ -370,9 +370,9 @@ fb_api_class_init(FbApiClass *klass)
G_SIGNAL_ACTION,
0,
NULL, NULL,
- fb_marshal_VOID__OBJECT,
+ fb_marshal_VOID__POINTER,
G_TYPE_NONE,
- 1, G_TYPE_ERROR);
+ 1, G_TYPE_POINTER);
/**
* FbApi::events: