Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

XBPython: fix crash on exit because of executing onNotification callb…

…ack on already destroyed scripts
  • Loading branch information...
commit cfc01aa3853a761879f15a5e25c657d02671a480 1 parent 59cef73
@Montellese Montellese authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 xbmc/interfaces/python/XBPython.cpp
View
5 xbmc/interfaces/python/XBPython.cpp
@@ -563,6 +563,11 @@ void XBPython::Finalize()
void XBPython::Uninitialize()
{
+ // don't handle any more announcements as most scripts are probably already
+ // stopped and executing a callback on one of their already destroyed classes
+ // would lead to a crash
+ CAnnouncementManager::RemoveAnnouncer(this);
+
LOCK_AND_COPY(std::vector<PyElem>,tmpvec,m_vecPyList);
m_vecPyList.clear();
m_vecPyList.hadSomethingRemoved = true;
Please sign in to comment.
Something went wrong with that request. Please try again.