Skip to content

Commit

Permalink
[fix] xbmc.Monitor onAbortRequested() hanging on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
amet committed Jul 6, 2012
1 parent ffd5a56 commit ba7c6fa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions xbmc/interfaces/python/XBPyThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,7 @@ void XBPyThread::Process()
Py_XDECREF(exc_traceback); // already NULL'd out
Py_XDECREF(pystring);
}

//tell xbmc.Monitor to call onAbortRequested()
g_pythonParser.OnAbortRequested();


PyObject *m = PyImport_AddModule((char*)"xbmc");
if(!m || PyObject_SetAttrString(m, (char*)"abortRequested", PyBool_FromLong(1)))
CLog::Log(LOGERROR, "Scriptresult: failed to set abortRequested");
Expand Down Expand Up @@ -434,7 +431,7 @@ void XBPyThread::stop()
PyThreadState* old = PyThreadState_Swap((PyThreadState*)m_threadState);

//tell xbmc.Monitor to call onAbortRequested()
g_pythonParser.OnAbortRequested();
g_pythonParser.OnAbortRequested(addon->ID());

PyObject *m;
m = PyImport_AddModule((char*)"xbmc");
Expand Down

0 comments on commit ba7c6fa

Please sign in to comment.