Index: dbus-python/dbus_bindings/conn-methods.c
===================================================================
--- dbus-python.orig/dbus_bindings/conn-methods.c
+++ dbus-python/dbus_bindings/conn-methods.c
@@ -39,7 +39,12 @@ _object_path_unregister(DBusConnection *
     PyObject *callable;
 
     conn_obj = (Connection *)DBusPyConnection_ExistingFromDBusConnection(conn);
-    if (!conn_obj) goto out;
+    if (!conn_obj) {
+        if (PyErr_ExceptionMatches(PyExc_AssertionError)) {
+            PyErr_Clear();
+        }
+        goto out;
+    }
     TRACE(conn_obj);
 
     DBG("Connection at %p unregistering object path %s",
Index: dbus-python/test/test-client.py
===================================================================
--- dbus-python.orig/test/test-client.py
+++ dbus-python/test/test-client.py
@@ -110,6 +110,15 @@ class TestDBusBindings(unittest.TestCase
         del bus
         self.assertTrue(ref() is None)
 
+    def testWeakRefsWithExportedObject(self):
+        # regression test: destroying an object on a connection should not
+        # raise AssertionError if Connection weakref is cleared during dealloc
+        address = os.environ['DBUS_SESSION_BUS_ADDRESS']
+        conn = _dbus_bindings.Connection(address)
+        obj = dbus.service.Object(conn, '/test/path')
+        del obj
+        del conn
+
     def testWeakRefsToBaseConnection(self):
         # regression test, using Py_TPFLAGS_MANAGED_WEAKREF without
         # Py_TPFLAGS_HAVE_GC produced invalid memory accesses, this test should
