Make sure device is deselected before removing it

This commit is contained in:
Julien BLACHE 2010-11-21 10:54:55 +01:00
parent 78df98ba35
commit 7de9408a10

View File

@ -1205,6 +1205,10 @@ device_remove(struct raop_device *dev)
DPRINTF(E_DBG, L_PLAYER, "Removing AirTunes device %s; stopped advertising\n", dev->name);
/* Make sure device isn't selected anymore */
if (dev->selected)
speaker_deselect_raop(dev);
if (!prev)
dev_list = dev->next;
else