Skip to content
This repository
Browse code

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

…ack on already destroyed scripts
  • Loading branch information...
commit cfc01aa3853a761879f15a5e25c657d02671a480 1 parent 59cef73
Sascha Montellese authored September 10, 2013

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  xbmc/interfaces/python/XBPython.cpp
5  xbmc/interfaces/python/XBPython.cpp
@@ -563,6 +563,11 @@ void XBPython::Finalize()
563 563
 
564 564
 void XBPython::Uninitialize()
565 565
 {
  566
+  // don't handle any more announcements as most scripts are probably already
  567
+  // stopped and executing a callback on one of their already destroyed classes
  568
+  // would lead to a crash
  569
+  CAnnouncementManager::RemoveAnnouncer(this);
  570
+
566 571
   LOCK_AND_COPY(std::vector<PyElem>,tmpvec,m_vecPyList);
567 572
   m_vecPyList.clear();
568 573
   m_vecPyList.hadSomethingRemoved = true;

0 notes on commit cfc01aa

Please sign in to comment.
Something went wrong with that request. Please try again.