]> git.ipfire.org Git - pakfire.git/commitdiff
python: ctx: Initialize the callbacks
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 14 Mar 2025 17:58:40 +0000 (17:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 14 Mar 2025 17:58:40 +0000 (17:58 +0000)
Just to be safe...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/ctx.c

index 6b7c30b07ea4800e5e162f9374e3e052aed76e23..18d25bcb848c63c4bb7bd31dae7274105651075c 100644 (file)
 
 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;
 }