Skip to content

Commit

Permalink
Fix GIL for get_unused_name (#324)
Browse files Browse the repository at this point in the history
Fixes #320
  • Loading branch information
speleo3 authored Dec 20, 2023
1 parent d59041b commit af77ece
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layer4/Cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2319,9 +2319,9 @@ static PyObject *CmdGetUnusedName(PyObject * self, PyObject * args)
} else {
API_HANDLE_ERROR;
}
if (ok && (ok = APIEnterNotModal(G))) {
if (ok && (ok = APIEnterBlockedNotModal(G))) {
auto result = PConvToPyObject(ExecutiveGetUnusedName(G, prefix, alwaysnumber));
APIExit(G);
APIExitBlocked(G);
return result;
} else {
return APIResultOk(ok);
Expand Down

0 comments on commit af77ece

Please sign in to comment.