Skip to content

Commit

Permalink
Fix GIL for get_unused_name
Browse files Browse the repository at this point in the history
  • Loading branch information
speleo3 committed Dec 19, 2023
1 parent d59041b commit 671c5c4
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 671c5c4

Please sign in to comment.