error_already_set: acquire GIL one line earlier (fixes #1779)

This commit is contained in:
Wenzel Jakob 2019-07-06 14:52:32 +02:00
parent 502ffe50a9
commit 8b90b1da62

View File

@ -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();