Skip to content

Commit 2494a88

Browse files
committed
fix: return NULL on failure in enter_safelocale()
1 parent 1b11041 commit 2494a88

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/_igraph/igraphmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ PyObject* igraphmodule__enter_safelocale(PyObject* self, PyObject* Py_UNUSED(_nu
784784
if (igraph_enter_safelocale(loc)) {
785785
Py_DECREF(capsule);
786786
igraphmodule_handle_igraph_error();
787+
return NULL;
787788
}
788789

789790
return capsule;

0 commit comments

Comments
 (0)