diff options
author | Paulo Alcantara <pcacjr@gmail.com> | 2011-11-23 15:29:09 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:18:25 -0300 |
commit | c97a88d7b397923a062150d4e25a799c0f2851ed (patch) | |
tree | 3041fb2a21afb14f754f51dcd3b7ed1b6d265269 | |
parent | 0d29fa4a50bfa1cf7720bb0ffc073838d85cd292 (diff) |
Fix BUG #1057sb-1.0.10
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
-rw-r--r-- | libshiboken/gilstate.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libshiboken/gilstate.cpp b/libshiboken/gilstate.cpp index cc8963ff7..cb682fa7e 100644 --- a/libshiboken/gilstate.cpp +++ b/libshiboken/gilstate.cpp @@ -26,8 +26,9 @@ namespace Shiboken { GilState::GilState() + : m_locked(false) { - if(Py_IsInitialized()) { + if (Py_IsInitialized()) { m_gstate = PyGILState_Ensure(); m_locked = true; } @@ -40,11 +41,11 @@ GilState::~GilState() void GilState::release() { - if(m_locked && Py_IsInitialized()) { + if (m_locked && Py_IsInitialized()) { PyGILState_Release(m_gstate); m_locked = false; } } -} // namespace Shiboken +} // namespace Shiboken |