Index: gi/arg.c
===================================================================
--- gi/arg.c	(revision 130)
+++ gi/arg.c	(working copy)
@@ -424,9 +424,12 @@
 
             symbol_type = g_base_info_get_type(symbol_info);
 
-            gtype = g_registered_type_info_get_g_type((GIRegisteredTypeInfo*)symbol_info);
+            if (symbol_type == GI_INFO_TYPE_OBJECT || symbol_type == GI_INFO_TYPE_INTERFACE || symbol_type == GI_INFO_TYPE_BOXED)
+                gtype = g_registered_type_info_get_g_type((GIRegisteredTypeInfo*)symbol_info);
+            else
+                gtype = G_TYPE_INVALID;
 
-            if (gtype != G_TYPE_NONE)
+            if (gtype != G_TYPE_INVALID && gtype != G_TYPE_NONE)
                 gjs_debug_marshal(GJS_DEBUG_GFUNCTION,
                                   "gtype of SYMBOL is %s", g_type_name(gtype));
 
@@ -456,6 +459,9 @@
                     arg->v_pointer = gjs_c_union_from_union(context,
                                                             JSVAL_TO_OBJECT(value));
 
+                } else if (symbol_type == GI_INFO_TYPE_CALLBACK) {
+                    gjs_throw(context, "Callback functions are not yet supported");
+
                 } else if (gtype != G_TYPE_NONE) {
 
                     if (g_type_is_a(gtype, G_TYPE_OBJECT) || g_type_is_a(gtype, G_TYPE_INTERFACE)) {
