Fixed a crash in mpris plugin

This commit is contained in:
Albert Vaca 2013-09-03 02:06:56 +02:00
parent 22392a4917
commit 935d91daf8

View file

@ -133,7 +133,13 @@ void MprisControlPlugin::removePlayer(const QString& ifaceName)
bool MprisControlPlugin::receivePackage (const NetworkPackage& np) bool MprisControlPlugin::receivePackage (const NetworkPackage& np)
{ {
if (np.type() != PACKAGE_TYPE_MPRIS) return false; if (np.type() != PACKAGE_TYPE_MPRIS) {
return false;
}
if (np.has("playerList")) {
return false; //Whoever sent this is an mpris client and not an mpris control!
}
//Send the player list //Send the player list
const QString& player = np.get<QString>("player"); const QString& player = np.get<QString>("player");