diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 0cc5dd523..68e5757ee 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1998,8 +1998,8 @@ class gil_scoped_release { }; error_already_set::~error_already_set() { if (m_type) { - error_scope scope; gil_scoped_acquire gil; + error_scope scope; m_type.release().dec_ref(); m_value.release().dec_ref(); m_trace.release().dec_ref();