From: Michael Tremer Date: Fri, 14 Mar 2025 17:58:40 +0000 (+0000) Subject: python: ctx: Initialize the callbacks X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a5d7bc04619f34c97c72ea536c5b8525e2aa5e8a;p=pakfire.git python: ctx: Initialize the callbacks Just to be safe... Signed-off-by: Michael Tremer --- diff --git a/src/python/ctx.c b/src/python/ctx.c index 6b7c30b0..18d25bcb 100644 --- a/src/python/ctx.c +++ b/src/python/ctx.c @@ -28,9 +28,14 @@ static PyObject* Ctx_new(PyTypeObject* type, PyObject* args, PyObject* kwds) { CtxObject* self = (CtxObject *)type->tp_alloc(type, 0); - if (self) + if (self) { self->ctx = NULL; + // Initialize callbacks + self->callbacks.confirm = NULL; + self->callbacks.progress = NULL; + } + return (PyObject *)self; }