=== modified file 'gi/pygi-argument.c'
--- gi/pygi-argument.c	2012-05-22 23:21:51 +0000
+++ gi/pygi-argument.c	2012-05-22 23:26:27 +0000
@@ -1097,9 +1097,13 @@
                         result = pygi_struct_foreign_convert_to_g_argument (
                                      object, info, transfer, &arg);
                     } else if (g_type_is_a (type, G_TYPE_BOXED)) {
-                        arg.v_pointer = pyg_boxed_get (object, void);
-                        if (transfer == GI_TRANSFER_EVERYTHING) {
-                            arg.v_pointer = g_boxed_copy (type, arg.v_pointer);
+                        if (pyg_boxed_check (object, type)) {
+                            arg.v_pointer = pyg_boxed_get (object, void);
+                            if (transfer == GI_TRANSFER_EVERYTHING) {
+                                arg.v_pointer = g_boxed_copy (type, arg.v_pointer);
+                            }
+                        } else {
+                            PyErr_Format (PyExc_TypeError, "wrong boxed type");
                         }
                     } else if (g_type_is_a (type, G_TYPE_POINTER) || 
                                g_type_is_a (type, G_TYPE_VARIANT) || 

=== modified file 'gi/pygi-property.c'
--- gi/pygi-property.c	2012-05-22 23:21:51 +0000
+++ gi/pygi-property.c	2012-05-22 23:27:08 +0000
@@ -267,6 +267,8 @@
     type_info = g_property_info_get_type (property_info);
     transfer = g_property_info_get_ownership_transfer (property_info);
     arg = _pygi_argument_from_object (py_value, type_info, transfer);
+    if (PyErr_Occurred ())
+        goto out;
 
     g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
 

