From a837a108183602cac9f73f1b433e10049cadaf2b Mon Sep 17 00:00:00 2001 From: CrystalP Date: Thu, 22 Sep 2011 23:35:19 -0400 Subject: [PATCH] fixed hang when exiting XBMC with remote --- xbmc/Application.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index a1c4d2dc37e7e..7fa3c342aed45 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -3010,6 +3010,11 @@ bool CApplication::ProcessEventServer(float frameTime) bool isAxis = false; float fAmount = 0.0; + // es->ExecuteNextAction() invalidates the ref to the CEventServer instance + // when the action exits XBMC + es = CEventServer::GetInstance(); + if (!es || !es->Running() || es->GetNumberOfClients()==0) + return false; WORD wKeyID = es->GetButtonCode(joystickName, isAxis, fAmount); if (wKeyID)