Skip to content

Commit

Permalink
Fixed segmentation error when trying to raise setter error
Browse files Browse the repository at this point in the history
  • Loading branch information
igo95862 committed Jun 13, 2022
1 parent 1f9a27e commit 2846bd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sdbus/sd_bus_internals_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,13 @@ PyType_Spec SdBusInterfaceType = {
};

static int set_dbus_error_from_python_exception(sd_bus_error* ret_error) {
#ifdef Py_LIMITED_API
PyObject* dbus_error_bytes CLEANUP_PY_OBJECT = NULL;
#endif
PyObject* current_exception = PyErr_Occurred();
if (NULL == current_exception) {
goto fail;
}
#ifdef Py_LIMITED_API
PyObject* dbus_error_bytes CLEANUP_PY_OBJECT = NULL;
#endif
PyObject* dbus_error_str = CALL_PYTHON_GOTO_FAIL(PyDict_GetItem(exception_to_dbus_error_dict, current_exception));
#ifndef Py_LIMITED_API
const char* dbus_error_char_ptr = SD_BUS_PY_UNICODE_AS_CHAR_PTR_GOTO_FAIL(dbus_error_str);
Expand Down

0 comments on commit 2846bd4

Please sign in to comment.