xbmc/xbmc — pull request #4478 by Montellese (2014-03-27 20:01:43+00:00)
Title: Two UPnP controller related fixes

The first commit fixes http://trac.xbmc.org/ticket/15050 where the user can choose a remote UPnP player (renderer) but the action doesn't work (and there is no feedback about the failure) because the UPnP controller needs the UPnP server running to be able to serve the necessary files to the renderer. Therefore I've changed the settings so that the controller can only be enabled if the server is enabled as well.

The second commit fixes the fact that when disabling the UPnP controller in the settings, any previously discovered remote renderers are still registered in CPlayerCoreFactory and are therefore still listed in the "Play using..." dialog. When selecting one of those remote renderers XBMC will crash because it tries to access a member variable from the UPnP controller which doesn't exist anymore. I've added a set to remember all discovered remote renderers and unregister them from the CPlayerCoreFactory when destroying the UPnP controller.