From b0654aa778ddcd50be3f885b4cbcc7a39633c11e Mon Sep 17 00:00:00 2001 From: polastyn <78505251+gresm@users.noreply.github.com> Date: Tue, 21 May 2024 23:58:07 +0200 Subject: [PATCH] Fix fallback event init condition. --- src_c/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src_c/event.c b/src_c/event.c index b101d6b52b..324a4c82dd 100644 --- a/src_c/event.c +++ b/src_c/event.c @@ -1891,7 +1891,7 @@ pg_event_init(pgEventObject *self, PyObject *args, PyObject *kwargs) int type; PyObject *dict = NULL; PyObject *self_t = (PyObject *)Py_TYPE(self); - if (PyObject_HasAttrString(self_t, "type")) { + if (self_t != (PyObject *)&pgEvent_Type) { PyObject *type_o = PyObject_GetAttrString(self_t, "type"); if (!type_o) return -1;