diff --git a/gi/pygi-marshal-from-py.c b/gi/pygi-marshal-from-py.c
index d3e61da..9ea6330 100644
--- a/gi/pygi-marshal-from-py.c
+++ b/gi/pygi-marshal-from-py.c
@@ -207,7 +207,15 @@ _pygi_marshal_from_py_void (PyGIInvokeState   *state,
 {
     g_warn_if_fail (arg_cache->transfer == GI_TRANSFER_NOTHING);
 
-    arg->v_pointer = py_arg;
+    /* We don't want to pass the Python wrapper to C API, so if we have
+     * a known type, return something sensible; just as a fallback, return the
+     * PyObject itself. */
+    if (py_arg == Py_None || py_arg == NULL)
+        arg->v_pointer = NULL;
+    else if (PyObject_TypeCheck(py_arg, &PyGObject_Type))
+        arg->v_pointer = pygobject_get (py_arg);
+    else
+        arg->v_pointer = py_arg;
 
     return TRUE;
 }
