Closes #15973: fix a segmentation fault when comparing timezone objects.
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index 6df5c03..01c85d1 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -3215,6 +3215,12 @@
 {
     if (op != Py_EQ && op != Py_NE)
         Py_RETURN_NOTIMPLEMENTED;
+    if (Py_TYPE(other) != &PyDateTime_TimeZoneType) {
+	if (op == Py_EQ)
+	    Py_RETURN_FALSE;
+	else
+	    Py_RETURN_TRUE;
+    }
     return delta_richcompare(self->offset, other->offset, op);
 }