]> granicus.if.org Git - icinga2/commitdiff
Clear current thread state before destroying the thread state object.
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 14 Feb 2013 15:02:43 +0000 (16:02 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 14 Feb 2013 15:02:43 +0000 (16:02 +0100)
lib/python/pythoninterpreter.cpp

index 63f31e0fc8ec1e9d3143ce22e2af5fc3b3e4a245..d56bdff91e5a40e7ff60ece13d67430513f35a83 100644 (file)
@@ -40,6 +40,8 @@ PythonInterpreter::~PythonInterpreter(void)
 {
        PyEval_AcquireLock();
 
+       (void) PyThreadState_Swap(NULL);
+
        PyThreadState_Clear(m_ThreadState);
        PyThreadState_Delete(m_ThreadState);