diff -r 613943a21004 -r 9386f31cc85b bluetoothappprofiles/avrcp/remconbeareravrcp/src/playerstatewatcher.cpp --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/playerstatewatcher.cpp Tue Aug 31 15:25:10 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/playerstatewatcher.cpp Wed Sep 01 12:20:04 2010 +0100 @@ -37,17 +37,14 @@ void CPlayerWatcherBase::StopWatchingPlayer(TRemConClientId aClientId) { LOG_FUNC; - CInternalCommand** cmdPtr = iCommands.Find(aClientId); - if (cmdPtr) // This may be NULL if we've already stopped watching the player as a result of reciving a reject - { - CInternalCommand* cmd = *cmdPtr; - - TUint transId = cmd->RemConCommandId(); - iCommandInterface.MrcciCommandExpired(transId); - - iCommands.Remove(aClientId); - cmd->DecrementUsers(); - } + CInternalCommand* command = *iCommands.Find(aClientId); + __ASSERT_DEBUG(command, AVRCP_PANIC(ENotWatchingPlayer)); + + TUint transId = command->RemConCommandId(); + iCommandInterface.MrcciCommandExpired(transId); + + iCommands.Remove(aClientId); + command->DecrementUsers(); } void CPlayerWatcherBase::MessageSent(CAvrcpCommand& /*aCommand*/, TInt /*aSendResult*/)