From 6fd508de96dfb7f24add712408ad99808a230304 Mon Sep 17 00:00:00 2001 From: Robert Nishihara Date: Sat, 30 Jul 2016 14:48:18 -0700 Subject: [PATCH] fix worker segfault --- src/raylib.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raylib.cc b/src/raylib.cc index 6629d617c..5b4e0aa2e 100644 --- a/src/raylib.cc +++ b/src/raylib.cc @@ -38,8 +38,8 @@ static void PyObjRef_dealloc(PyObjRef *self) { std::vector objrefs; objrefs.push_back(self->val); worker->decrement_reference_count(objrefs); - self->ob_type->tp_free((PyObject*) self); Py_DECREF(self->worker_capsule); // The corresponding increment happens in PyObjRef_init. + self->ob_type->tp_free((PyObject*) self); } static PyObject* PyObjRef_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {