Imported Upstream version 3.21.92
[platform/upstream/pygobject2.git] / gi / pygi-basictype.c
index b6515c3..4a5e112 100644 (file)
@@ -255,6 +255,11 @@ _pygi_marshal_from_py_filename (PyObject          *py_arg,
     GError *error = NULL;
     PyObject *tmp = NULL;
 
+    if (py_arg == Py_None) {
+        arg->v_pointer = NULL;
+        return TRUE;
+    }
+
     if (PyUnicode_Check (py_arg)) {
         tmp = PyUnicode_AsUTF8String (py_arg);
         if (!tmp)